This is your first - of many - encounters with Captain De Santa, as you play both sides of the fence in your mission to capture your targets in Mexico. This mission also relies heavily on rifle ammo, so be sure you're stocked up before you start it! Jump onto the carriage with De Santa and ride shotgun with him (skipping the journey if you feel like it).
Ride your horse alongside the train as it makes its way to its destination. It has a blue health bar that will deplete as it takes shots from the rebels who attack it. The trick is to try and stay near the front of the train at all times.
This allows you to quickly cross the tracks and deal with the enemies on the opposite side of the track (if you try and shoot them from the other side, you risk damaging the train you're trying to protect)!
Take advantage of the auto-aim here to make your life much less frustrating as you'll encounter a large number of horse riding rebels from both sides of the track. Keep the pressure on the rebels and get into the tunnel before the train does to head off the ambush before it can do any real damage.
Once the train reaches its destination head into the bar and you'll discover that the rebels have stolen the train you were just protecting! Rush outside and get onto your horse as quickly as possible. Give chase, kill the guards on board the train and when you reach the front of it, press Y/Triangle to hop on board.
Now press the button prompted on the screen to get John to initiate the brakes before the train sails over the side of the cliff!