In the back. The train will be accelerating so it will be going faster when the back of the train enters the tunnel so a person in the back will spend less time in the tunnel.
I fly to any foreign parts assisted by my spreading wings. My body holds an hundred hearts Nay I will tell you stranger things when I am not in haste I ride and then I mend my pace anon.