Firstly we need a reference date. I´ve chosen the year when the man is 50 years old. On the LHS the investment is compounded $26$ ($=50-24$) years. On the RHS we use the formula for the geometric series to calculate the future value of $20$ ($=50-31+1$) payments.
$$200,000\cdot 1.07^{26}=x\cdot \frac{1.07^{20}-1}{0.07}$$
$x=...$