You already have to be in the Governor's Mansion.
How do I get past the guard dogs?
And you should have run the yak, rhinoceros, wax-lips automated gauntlet by passing through the double doors to the right of the front door.
Now, what did Guybrush say he needed to remove the Idol of Many Hands from its case?
He needs a file.
Who might have file?
To saw through bars with?
The prisoner in the jail might have one. Why don't you talk to him and ask him if he has a file?
How can I talk to the prisoner?
He says no. All he has is a carrot cake his Aunt Tillie made him.
In bad movies, where is the file always hidden when it is smuggled to the prisoner?
The relatives always hide it in a loaf of bread, or a pastry, or...
In a carrot cake.
How can I get the carrot cake from Otis?
Once Otis has given you the carrot cake, open it to find a file inside.
Go back to the mansion, and climb through the hole behind the painting to get the Idol.