Let $A F=x \Longrightarrow B E=840-x$.
Draw altitude from $F$ to $A G$. Can you spot the similar triangles?