# When is the probability of a variable equivalent to a function of the variable i.e. when does p(x)=f(x)?

What allows us to conclude that that p(z)= h(z) as shown in the yellow highlights in the below solution? If p(z) didn't equal h(z) then proportionality would still fail to show conditional independence.

Your assumption is wrong and that is what is causing the confusion. $p(z)$ and $h(z)$ are not necessarily equal to each other, i.e., they did not just cancel each other out in the numerator and denominator as I assume you think. But rather, it is the proportionality that allows us to get rid of both$p(z)$ and $h(z)$.
Since the pdf $p(x,y|z)$ really only depends on $x$ and $y$ we can drop any terms form the right hand side that do not depend on $x$ and $y$ (i.e., $p(z)$ and $h(z)$ only depend on $z$ and can be dropped) since we are only concerned with proportionality.