The horse's position on the ground at time <em>t</em> is
<em>x</em> = (20 m/s) <em>t</em>
The baboon's height from the ground at time <em>t</em> is
<em>y</em> = 3 m - 1/2 <em>g</em> <em>t</em>²
where <em>g</em> = 9.80 m/s² is the magnitude of the acceleration due to gravity.
The baboon falls and lands on the horse, so that the two animals meet when the baboon's height is 2 m from the ground, which happens after
2 m = 3 m - 1/2 <em>g</em> <em>t</em>²
1/2 <em>g</em> <em>t</em>² = 1 m
<em>t</em>² = (2 m) / (9.80 m/s²)
<em>t</em> ≈ 0.452 s
In this time, the horse reaches the tree, so its distance from it is
(20 m/s) * (0.452 s) ≈ 9.04 m