设西瓜x,梨180-x
x(1-2/5)=(180-x)(1-1/4)
4x=5(180-x)
4x=900-5x
9x=900
x=100
180-100=80kg
答:西瓜100千克;梨子80千克.