https://en.wikipedia.org/wiki/Railroad_police are actually a thing! It's not just transit either. Most of the big US railroads have their own private police forces. The officers are deputized by the state, and then by federal law their powers are valid in any state that railroad has track. They even have arrest powers.