You can put this solution on YOUR website! Let the two numbers = a and b
Given:
a - b = 4 -> a = b + 4
a^2 + b^2 = 40
(b+4)^2 + b^2 = 40
Solve for b:
b^2 + 8b + 16 + b^2 - 40 = 0
2(b^2 + 4b - 12) = 0
Factoring gives
(b-2)(b+6) = 0
Since the numbers are positive, we have b=2
Therefore the two numbers are 2 and 6