Given,
John and Jilani together have a total of 45 marbles.
Let John have x marbles.
So, Jivani will be having (45 – x) marbles.
Number of marbles John had after losing 5 marbles = x – 5
Number of marbles Jivani had after losing 5 marbles = (45 – x) – 5 = 40 – x
Now, according to the question the product of the marbles that they are having now is 128
So,
(x – 5)(40 – x) = 128
⇒ 40x – x2 – 200 = 128
⇒ x2 – 45x + 128 + 200 = 0
⇒ x2 – 45x + 328 = 0
Thus the required quadratic equation is x2 – 45x + 328 = 0.