X-X/5=X- 10+X/5
2X/5= 10
X=25
25-10 =15t
The warehouses of Party A and Party B store 25 tons of grain and 15 tons of grain respectively.