sold a bycycle at loss of 20%. if he had sold it for 800 more, he would have receive a profit of 5%. find cost price

cost price --- x

selling price ---- .8x

(.8x + 800)/x = 1.05
1.05x = .8x + 800
.25x = 800
x = 3200
cost price is 3200

check:
bought at 3200, sold at 2560
had he sold it at 2560+800 or 3360, he would have made a profit of 160
and 160/3200 = .05 or 5%