Think of the set $A$ that underlies the probability space $(A, \sigma_A,P_A)$ as some vast population to each of whose members you assign values of various functions whose domain is $A$: their height in inches, their income, their weight, how far they are from London, etc. One of those functions is the random variable $X.$ The measure $P'_B,$ whose domain is $\sigma_B$ is the one you care about and are likely to know about; all those myriad other random variables whose domain is the population $A$ need not concern you for the purposes of this problem. Thus you use what you know about $P'_B$ to find the probability distribution of $Y\circ X.$

Thus if you're told the distribution of IQ scores is
$$
\frac1 {\sqrt{2\pi\,}}\exp\left( -\frac12 \left( \frac{x - 100}{15}\right)^2 \right) \, \frac{dx}{15} \tag 1
$$
and you want the distribution of the square of IQ scores, you use the information on line $(1)$ above.

That is typical in practice.