First we calculate the time it took before coming to rest. We use the vertical component of velocity in this case. The formula is:
vy = v0 sinθ – g t
where, vy is final velocity at the peak = 0, v0 sinθ = initial vertical velocity, g is acceleration due to gravity, t is time
therefore:
0 = 12 sin20 – 9.8 t
t = 0.4188 s
Then calculate the distance using the horizontal component:
d = v0 cosθ t
d = 12 cos20 * 0.4188
d = 4.72 m