Let one of the natural numbers be ‘a’
Given, the numbers differ by 3.
⇒ 2nd number = a + 3
⇒ a2 + (a + 3)2 = 117
⇒ a2 + a2 + 6a + 9 = 117
⇒ a2 + 3a – 54 = 0
⇒ a2 + 9a – 6a – 54 = 0
⇒ a(a + 9) – 6(a + 9) = 0
⇒ (a – 6)(a + 9) = 0
⇒ a = 6, - 9
Thus, the numbers are 6, 9