slamming its head THROUGH the wall of course
because it can’t hit the wall, due to being a ghost and not being able to interact physically with matter
…which also means it wasn’t actually capable of opening or closing a door.
So the most infuriating thing for this poor ghost is that you were RIGHT about the temperature differential