let here North direction is along +Y and South direction is along -Y
similarly East direction is towards +X and west direction is towards -X
now it is given that
first it moves 235 km north
[tex]d_1 = 235 \hat j[/tex]
then it moves back 126 km south
[tex]d_2 = - 126 \hat j[/tex]
then again he moves north
[tex]d_3 = 45 \hat j[/tex]
now the total displacement is given as
[tex]d = d_1 + d_2 + d_3[/tex]
[tex]d = 235 - 126 + 45 = 154 km [/tex]
so final displacement of train is 154 km North