The Latitudes are irrelevant and can be discounted as these have no effect on the change of longitude.
As both Easterly and Westerly lines of longitude are greater than 90° we may safely assume that the examiner wishes us to take the shortest route and this can be achieved by adding together the two values of longitude and subtracting the total from 360°.
Difference in Longitude = 360° - (145° + 165°)
Difference in Longitude = 360° - 310°
Difference in Longitude = 50°