Let the required number be x.
Then, according to proportionality rule, we get:
⇒ (5 + x)(27 + x) = (17 + x)(9 + x)
⇒ 135 + 5x + 27x + x2 = 153 + 17x + 9x + x2
⇒ 135 + 32x = 153 + 26x
⇒ 32x - 26x = 153 - 135
⇒ 6x = 18
⇒ x = 3
Hence, the required number is 3.
OR
Let the required numbers be x and y.
Then, x + y = 18
and
∴
∴ x + y = 18 .....(i)
and x - y = 6 ......(ii)
Or
∴ x + y = 18 .....(iii)
and x - y = - 6 ......(iv)
On solving (i) and (ii), we get: x = 12 and y = 6.
On solving (iii) and (iv), we get: x = 6 and y = 12.
Hence, the required numbers are 12 and 6.