You need to block the sewage flowing through the channel.
The machinery in the room to the right drops the gate.
A gear is supposed to go on a bare shaft for the machine to work.
In room with ladder, GET GEAR sitting in the corner. +1
Go back to other room and USE GEAR ON SHAFT. +5