If X and Y are random variables with the same distribution, prove that f(X) and f(Y) are random variables that have the same distribution.
Solution 1:
You are using the fact that $X$ is a random variable, that $f$ is Borel measurable, and that pre-images obey the rule $Z^{-1}(B)=X^{-1}(f^{-1}(B))$ for $Z=f(X)$. Neither of the first two assumptions can be relaxed.
If $P(X\in A)=P'(Y\in A)$ for all $A\in\mathfrak B$, then 2. follows from the fact that $$ P(f(X)\in A)=P(X\in f^{-1}(A))=\cdots=P'(f(Y)\in A) $$ and that $f^{-1}(A)\in\mathfrak B$ for all $B\in\mathfrak B$ since $f$ is assumed Borel measurable.
Solution 2:
For 1: Show $(f \circ X)^{-1} (A) \in \mathfrak{F}$ for any $A \in \mathfrak{B}$.
For 2:
$P \{ \omega | F(X(\omega)) \in A \} = P \{ \omega | X(\omega) \in F^{-1}(A) \} = P' \{ \omega | Y(\omega) \in F^{-1}(A) \} = P' \{ \omega | F(Y(\omega)) \in A \}$.