Let one of the number be x then other number is (18 − x).
Then according to question,
1x+118-x=14⇒18-x+xx(18-x)=14⇒18×4=18x-x2⇒72=18x-x2⇒x2-18x+72=0⇒x2-12x-6x+72=0⇒x(x-12)-6(x-12)=0⇒(x-6)(x-12)=0⇒x-6=0 or x-12=0⇒x=6 or x=12
Since, x being a number,
Therefore,
When x=12 then another number will be
18-x=18-12=6
And when x=6 then another number will be
18-x=18-6=12
Thus, the two numbers are 6 and 12.