5/9X+4/9Y=40
1/3X+2/3Y=42
The solution is X=36 and Y=45.
therefore
The price of raw material A is 36 yuan, and the price of raw material B is 45 yuan.