40% of the stored grain is shipped out from the second warehouse, leaving 60%, that is, 3/5.
Then the surplus grain of warehouse B is twice that of warehouse A. (2* 1/3):3/5= 10:9.
Warehouse B = 95 *10/(10+9) = 50 tons.
A warehouse =95-50=45 tons