I don’t think it’s possible to do this precisely, but you could try this experimental plug-in for evening out the level: https://forum.audacityteam.org/t/agc-automatic-gain-control/26706/1
and try the “Time Track” feature for adjusting the pitch: http://manual.audacityteam.org/man/time_tracks.html
You might do better buying a commercial recording. Train sounds are quite common as “sound effects”.