Open treasure chest.
Get the metal plate with screws off Tom and screw it into space at the grate with letter opener or coins.
Get Tom to press buttoms in sequence from left to right. Ask him what pressing the middle button did.
Ask him what the hatch above him does.
Go back upstairs and see if you can push the coffin/container that held Ruby to see if you when the hatch opens you can rescue Tom.