Before you can repair anything, make sure you have collected both the arm and the leg, plus all three fragments of the robot's blueprint. Those scraps are hidden in three different rooms: the library, the operating room, and the machine room.
Once you have them, head into the room on the left — the one dominated by the enormous machine. Assemble the blueprint there and slide the completed paper into the slot on the right-hand side.
Next, insert a limb. The machine wants a specific colour sequence: for the arm, press yellow then purple; for the leg, press green then purple. When the sequence is correct, the machine confirms that the piece has been repaired.
Finally, carry the fixed parts to the operating room and attach them to the robot.