After the transfer, there are 7X-30 pieces left in warehouse A and 3X+30 pieces left in warehouse B. ..
At this point, the number of two warehouses is equal,
That is: 7X-30=3X+30.
solve
X= 15
Therefore, warehouse A originally had 7* 15= 105, and warehouse B originally had 3* 15=45.