I suggest you to use this picture. It will help you to get what's going on. According to the information you've given, AD = 18m, AG=24m. So we need to know derivates. I suggest you to use 2 common formulas: a*b=A (I'm pretty sure, you know what it is about), and Pythagoras theorem A^2+B^2=C^2. Your main goal is to find out what the lengths of each sides are in relation to changing the length of one side. You've everything to find all the values you need. Hope you'll find it helpful.