The whole train needs to travel the tunnels length of 5 miles, plus another mile for it to completely pass the tunnel because it is 1 mile long.
Speed of the train = 60mph = 1m/min
Total distance to be covered = 5 + 1 = 6 (5 miles for the tunnel and an extra mile for the train to pass the tunnel)
Thus time taken = Distance/speed
= 6 mins
Hope that helps !!