I am pretty sure that the systems which work on the surroundings are :
A. 2A(g) + 2B(g) ----> 5C(g)
B. A(g) + 2B(g) --->2C(g)
Since B is a solid, A incrases (2-3) so it is an expansion. The same happens with B from 4 to 5 moles of C. I thing is clear, and I hope you will find it helpful.