The problem with this is that the book seems like it would be wrong. if you use to weight in the portfolio it includes the allocation effect on the market.
Not sure of the specific questions, but market return can be calculated differently depending on the context. For a portfolio’s total return decomposition, you use portfolio weights. For performance attribution using a global index, you use benchmark weights. Perhaps the old exam is assuming a particular context.
Little piece of advice, I don’t expect the whole return decomposition question to show up in the exam. Most probably you would see a piece calculation question like currency allocation return or security selection return. Memorize the formula, understand it thoroughly so that you can pick right weights and returns and you should be good.