Let the father’s age be x years. Then, the son’s age will be (42 – x) years.
Thus, by the given condition,
x(42 – x) = 185
42x – x2 = 185
x2 – 42x + 185 = 0
On splitting the middle term –42x as –5x – 37x, we get:
x2 – 5x – 37x + 185 = 0
x(x – 5) – 37(x – 5) = 0
(x – 5)(x – 37) = 0
x – 5 = 0 or x – 37 = 0
x = 5 or x = 37
Since the father’s age will be greater than the son’s age, x = 37 and (42 – x) = 42 – 37 = 5.
Thus, the father’s age is 37 years and the son’s age is 5 years.