a man covered a certain distance at some speed. had he moved 3 kmph faster, he would have taken 40 minutes less. if he had moved 2 kmph slower, he would have taken 40 minutes more. the distance ( in km ) is  Choose one.
A) 27
B) 87
C) 40
D) 18
E) 17
<gadget id="calculator">2 * 3</gadget>
<output>6</output>

<gadget id="calculator">6 * 2</gadget>
<output>12</output>

<gadget id="calculator">3 - 2</gadget>
<output>1</output>

<gadget id="calculator">12 / 1</gadget>
<output>12</output>

<gadget id="calculator">40 / 60</gadget>
<output>2/3 = around 0.666667</output>

<gadget id="calculator">12 * (2/3)</gadget>
<output>8</output>

<gadget id="calculator">12 / 3</gadget>
<output>4</output>

<gadget id="calculator">1 + 4</gadget>
<output>5</output>

<gadget id="calculator">8 * 5</gadget>
<output>40</output>

<result>C</result>
a man covered a certain distance at some speed. had he moved 3 kmph faster, he would have taken 40 minutes less. if he had moved 2 kmph slower, he would have taken 40 minutes more. the distance ( in km ) is
multiply(multiply(divide(multiply(multiply(2, 3), 2), subtract(3, 2)), divide(40, const_60)), add(const_1, divide(divide(multiply(multiply(2, 3), 2), subtract(3, 2)), 3)))
explanation : let distance = x km and usual rate = y kmph . then , x / y - x / ( y + 3 ) = 40 / 60 - - > 2 y ( y + 3 ) = 9 x - - - - - ( i ) also , x / ( y - 2 ) - x / y = 40 / 60 - - > y ( y - 2 ) = 3 x - - - - - - - - ( ii ) on dividing ( i ) by ( ii ) , we get : x = 40 km . answer : c