65 minutes before 7 o'clock.

The difference between 2 and 7 o'clock is 5 hours = 300 minutes.

The time is x minutes to 7 -> 300 - x

40 minutes ago it was 3*x minutes past 2 -> 3 * x = (300 - x) - 40

This gives: 4 * x = 260 -> x = 65 minutes.

The time is 65 minutes to 7 -> 5:55