(i) Let the number of John's marbles be x.
Therefore, number of Jivanti's marble = 45−x
After losing 5 marbles,
Number of John's marbles = x−5
Number of Jivanti's marbles = 45−x−5=40−x
It is given that the product of their marbles is 124.
∴(x−5)(40−x)=124
⇒x2−45x+324=0
⇒x2−36x−9x+324=0
(Splitting the middle term -45x as -36x-9x because −36x×−9x=324x2)
⇒x(x−36)−9(x−36)=0
⇒(x−36)(x−9)=0
Either x−36=0 or x−9=0
⇒x=36 or x=9
If the number of John's marbles = 36,
Then, number of Jivanti's marbles = 45−36=9
If number of John's marbles = 9,
Then, number of Jivanti's marbles = 45−9=36