I will be very greatful to you if you help me to solve the below problem:

A man purchased goods Rs.880.He sold one-fourth of the goods at 15%loss.At what percent gain should the remaining be sold to gain 5% on the whole?

I had done the above problem like this:

C.P=Rs 880
C.P of 1/4th of the goods
=1/4*880=Rs 220
S.p=C.P*(100+g%)/100
=220*(100+5)/100
=220*105/100
=21*11
=Rs 231

Therefore he should sell it at Rs 231 to gain 5% profit.

But you did not answer the question.

It said " at what percent gain should the remaining be sold to gain 5% on the whole."

so he sold Rs 220 at a 15% loss --- (85/100)(220)
he must gain 5% on the whole --- (105/100)880
he sells the rest at x% of Rs 660

(85/100)(220) + (x/100)(660) = (105/100)880
times 100 and expand
18700 + 660x = 92400
x = 111.666

so he must sell the rest at a markup of 11.6666% or 11 2/3 %

check: with 15% loss on 220 = .85(220) = 187
with 11.66667% gain on 660 = 737
total = 924

gain of 5% on 880 = 1.05(880) = 924
YEAHHH!