The formula that will be applied here is:
2as = v² - u²;
where a is the acceleration, s is the distance, v is the final velocity and u is the initial velocity. The acceleration and initial velocity will be in the opposite direction, so we will take acceleration to be negative. Moreover, the final velocity of any object thrown upwards at the top of its throw is 0. So we get:
2(-a)s = -u²
2as = u²
s = u²/2a
Now, for earth:
s(E) = u²/2g
For the moon:
s(M) = u²/2*0.17g
Taking the ratio s(E)/s(M)
s(E)/s(M) = 0.17
Rearranging,
s(M) = s(E) / 0.17
The distance thrown on the earth is 12 meters, so:
s(M) = 12/0.17
The astronaut will be able to throw the wrench 70.6 meters on the moon.