Zoom into the old man and give him the SOUP to receive the PRAYER WHEEL (O).
Return to the Temple.
Zoom into the mechanism and place the PRAYER WHEEL on it to activate a puzzle (P).
Rotate the cubes with the arrows (1-10) until the symbols on them match the red buttons.
The beginning configuration is random, the screenshot shows the final solution (P1).
Take the BRICK 4/4 and the WOODEN GEAR 1/2 (R).
Zoom into the steps; use the 4 BRICKS on them (S).
Take the WOODEN GEAR 2/2 (T).
Zoom into the door and place the 2 WOODEN GEARS on it to activate a puzzle (U).