I don't understand the calculations using Bounding Box and Mix

I’m using GeometryNodes in Blender 3.3 to create various staircase generators, but I can’t set the scale of the image instance properly.

*This type of staircase generator generates stairs by deforming the mesh with the usual shortcut keys.

What calculations are missing to fit the bounding box or mesh of the original geometry?

The mix is connected to the mix using the index + position of the face corner stored as name attribute in ‘face’.
The name attribute before separation is the Min and Max of the bounding box from the instance’s staircase step, stored as position + range mapping.

The image node is connected to the ‘instantiate to point’ scale, as connecting the image node to the ‘position’ node would cause the whole thing to move.

I have tried various connections but no improvement.
Can you give me some hints?

The scale of the blue edges does not scale with the way the images are connected.
I would like to keep the red ones as they are.