I bought 238 * 0.7+2 * 238 * 0.9 =166.6+428.4 = 595 yuan, which is equivalent to borrowing 500 yuan from Party B and giving 95 yuan a discount. Party A's 500 yuan is used up, but 79 yuan has not moved.
B 500 yuan +79 yuan with capital.
I bought 99 * 0.9+238 * 0.9+238 = 303.3+238 = 541.3 yuan, which is equivalent to borrowing 79 yuan from A, using up 79 yuan from B and leaving 500 yuan.
95-79= 16 yuan, and Party A gives it to Party B 16 yuan.