Let x and y be the two unknowns positive integers
- the difference between 2 positive integers is 3: x - y = 3
- If the smaller is added to the square of the larger, the sum is 339: x2 + y = 339
Since x-y = 3, then x = y+3. Substitute y+3 in place of x in the second equation.
x2 + y = 339
(y+3)2 + y = 339
y2 + 6y + 9 + y = 330
y2 + 7y - 330 = 0
Factors to:
(y+22)(y-15) = 0
y = -22 and 15. Since we want positive integers, y = 15. x = y+3 = 18.
Check:
182+15 = 339
324+15 = 339
339 = 339
Check!