The grain in granaries A and B is 3 tons and 2 tons respectively. After removing 180 tons from Party A: 3X- 180 tons.
From 3x-180: 2x = 5; For the 10X=4(3X- 180) solution of 4, X=360.
So the raw grain of A is 1080 tons.