设有X个苹果,Y个果箱.
25Y+40=X ①
30(Y-20)=X②
把①代入②得30(Y-20)=25Y+40
30Y-600 =25Y+40
5Y=640
Y=128
X=3240
答:有3240个苹果,128个果箱.