This shouldn't work.
the passage wall spell states:
A passage appears at a point of your choice that you can see in a wood, plaster or stone surface (such as a wall, ceiling or floor) within range, and lasts for the duration. You choose the dimensions of the opening: up to 5 feet wide, 8 feet high and 20 feet deep. The passage does not create instability in a structure that surrounds it.
The fifth edition uses natural language (standard English) when describing things, so it is up to us to decide what a "surface" is. lexico defines "surface" as:
The outer part or the top layer of something.
Very technically it would seem that a Stone Golem would work, however, the spell lists examples of surfaces "walls, ceilings, floors," are very similar surfaces and are all objects, not creatures. If the spell wanted to include creatures as an option, he would have said so.
Another thing that I think is true is that surfaces simply have to be objects (naturally, I would not call a living being a surface). The spell does not explicitly indicate that the surface cannot be a creature, but I think this is implied independently and, therefore, you cannot point to a Stone Golem with the passage wall spell out.
This is supported by this Q / A ("Can the Meld Into Stone spell be cast on another person?") Where Jeremy Crawford's tweet (a good source of RAI) is cited:
Meld into Stone affects only the caster and the stone that the caster touches. If a spell allows you to aim at others, define who you can aim for.
He also said in this tweet:
The stone fusion spell works on a stone object or a stone surface, such as a wall, floor or ceiling. An elemental or a golem is a creature, not an object, wall, floor or ceiling
This supports the idea that a Stone Golem does not count as a surface. the passage wall Y melt into stone spells use the same wording and, therefore, the same logic / idea would apply.
the passage wall The spell (most likely RAW and definitely RAI) cannot work on a Stone Golem, or any creature for that matter.