Let larger number = x
Smaller number = y
According to first condition of question
x2 – y2 = 180 …(i)
According to second condition of question
y2 = 8x …(ii)
Putting value of y2 from equation (ii) in equation (i)
x2 – 8x = 180
⇒ x2 – 8x – 180 = 0
Comparing it by ax2 + bx + c = 0
a = 1, b = -8, c = -180
Then by quadratic formula

Thus x = 18 and -10
When x = 18, then from equation (ii)
y2 = 8 × 18 = 144
⇒ y = ±√144
⇒ y = ± 12
When x = -10, then from equation (ii)
y2 = 8 × (-10)
⇒ y2 = -80 (not possible)
∴ y = ± 12
y = + 12 and – 12
Hence, required numbers will be 18 and 12 or 18, -12