Explanation:
The question is not exactly worded in such a way that one can tell how it should be answered.
If it means that 40 is the suim of 2 primes done 3 ways then the 3 answers are
17 + 23
37 + 3
11+ 29
So the difference between 37 and 29 = 8
There are no guarantees about this answer. I'm just doing it the way the question reads.