If you haven’t figured it out yet then read this following short guide.
Midnight Man Puzzle Solution
In the portal world the left one controls the portal location, and the right one controls the house or door in the real world location so to speak.
So you need to move the rock in the real world to block the bottom middle real world location.
Then go back into the portal world and move both the left and right “clocks” to point towards the bottom, and lead the imp into it.