The distance travelled by the aircraft in 10mins for bearing change is 40Nm( 10/60 multiply 240).The angle between the two bearings is 45 degrees.So the triangle formed is an isoceles triangle.Therefore the distance travelled in 10 mins is also the distance to the NDB.....
Answer -
40Nm