Let the number of marbles.Sridhar had be x.
Then the number of marbles Rajendar had=45-x
The number of marbles left with Sridhar,when he lost 5 marbles =x-5
The number of marbles left with Rajendar,when he lost 5 marbles=(45-x)-5=40-x
Therefore,their product
=(x-5)(40-x)
=x-x2-+5x
=-x2+x-
so, -x2+x-=124(given that product=124)
-x2+x-=0
(multiple by -1)
x2- x+=0
Therefore,the number of marbles Sridhar had 'x' should satisfy the quadratic equation
x2-x+=0