I'm writing the two theorems here and including images of the proofs, with the equalities I'm having trouble proving for myself indicated. Thanks for your help.

Theorem 1 (e): If $f:X \to Y$ is continuous and $Z$ is a subspace of $Y$ containing the image set $f(X)$, then the function $g:X \to Z$ is continuous.

Theorem 2 (f): The map $f:X\to Y$ is continuous if $X$ can be written as the union of open sets $U\_{\alpha}$ such that $f|U\_{\alpha}$ ($f$ restricted to $U\_{\alpha})$ is continuous for each $\alpha.$

![enter image description here](https://i.stack.imgur.com/AN2wE.png)