in the first pic he guy just jumped up there because whoever the idiot was who worked on that car last put a smaller diameter wheel set in the front truck. This allows the end of the car to sit lower so you can get on easier.
The second car ya just walk down the middle of the tracks to the car, reach up to grab the handbrake wheel and step on the cut lever close to the coupler. The guy is sitting over the edge so he can jump outta the way when that gravel which is over the rail in places derails the car