Proof verification : $X$ and $Y=g(X)$ are independent random variables $\implies$ $Y$ is degenerate THE PROBLEM :

Source : Alan F. Karr (Probability), p.$96$, problem $3.10.(b)$
MY SOLUTION :
Suppose $B \subset \mathbb{R}$ such that $P\left\{Y \in B\right\}=1$. We want to show that $B$ is singleton. First of all $B \neq \phi$ since $g(0) \in B$. Assume, for sake of contradiction, $B$ is not singleton. Let $A \subset B$ such that $P\left\{Y \in A\right\}>0$ and $P\left\{Y \in B \setminus A\right\}>0$. Such a set $A$ can always be constructed because of the assumption. Note that
$$P\left\{X \in g^{-1}(A), Y \in A^c\right\} = 0 \neq P\left\{X \in g^{-1}(A)\right\} \cdot P\left\{Y \in B \setminus A\right\}$$
Both the terms in the right side are strictly positive by assumption $(P\left\{X \in g^{-1}(A)\right\}=P\left\{Y \in A\right\}>0)$. Hence, $X$ and $Y$ are not independent. Thus, we have arrived at a contradiction.
Please verify whether or not my solution is technically okay and if it can be improved in any regards. Thanks in advance.

I may be using facts above what you currently know* but here goes:
Y is a distraction. We have that $X$ & $g(X)$ are independent. By definition, $$\sigma(X) \ \text{&} \ \sigma(g(X)) \ \text{are independent.}$$
$$\to \sigma(X) \ \text{&} \ \sigma(X) \ \text{are independent} \tag{Why? Hint: subset}$$
This means that $X$ is independent of itself and thus is constant or at least almost surely constant! Why?
Let $B \in \mathscr B$.
$$P(X \in B, X \in B) = P(X \in B)P(X \in B)$$
$$P(X \in B, X \in B) = P(X \in B)$$
Equating the RHS's, we have $P(X \in B) = 0,1$
I think this means $X$ is constant, but this certainly means that $X$ is almost surely constant i.e. $\exists d \ \in \ \mathbb R$, s.t.
$$P(X=d)=1$$
$$\to P(g(X)=g(d))=1 \tag{Why? Hint: subset}$$
$$\to P(Y=g(d))=1$$
Now choose $c=g(d)$. Then
$$P(Y=c)=1 \ \text{QED}$$
*Do you know Kolmogorov 0-1 Law?
