One way to do this, more "algebra" than "geometry" (well, "analytic geometry"), is to set up a coordinate system so that the x-axis is along the ground, the y-axis is along the 4 m post. Then (0, 0) is at the base of the 4 m post. Let "d" be the distance from the base of the 4 m post to the base of the 5 m post. Then the line from the base of the 4 m post to the top of the 5 m post goes through (0, 0) and (d, 5) so has equation y= (5/d)x. The line from the top of the 4 m post to the bottom of the 5 m post goes through (0, 4) to (d, 0) so has equation y= 4- (4/d)x. Those lines intersect when y= (5/d)x= 4- (4/d)x. Multiply by d to get 5x= 4d- 4x. Add 4x to both sides: 9x= 4d. x= (4/9)d. The point of intersection will have height y= (5/d)((4/9)d)= 20/9 m or 2 and 2/9 m.
It is interesting that the height of the intersection of the two lines is independent of the distance between the two posts.