G = (7h + 2f + 3c - 17.15)/2
D is the answer
40050 divided by 3.14 is 12754.77707
I don't have my calculator handy just now. But just looking at that problem, why don't you try +20 and -45 and see if they do the job.
The answer is 12, hope this helps