Without additional assumptions, the claim is false. The claim is equivalent to:
Let $f:D\to D'$ be a bijection. Then $ff^{-1}(x)=f^{-1}f(x)$ exactly when the real number $x$ is in the subset $D\cap D'\subseteq\mathbb R$.
This is wrong because it assumes $D,D'$ are subsets of $\mathbb R$, which is of course in general not true. For example, consider the identity map $\mathbb C\to\mathbb C,z\mapsto z$. Then
$$\{x\in\mathbb R\mid (f^{-1}f)(x)=(ff^{-1})(x)\}=\mathbb R\neq\mathbb C=\mathbb C\cap\mathbb C.$$
By extension, your proof is wrong. However, if we were to add the assumption $D,D'\subseteq\mathbb R$, then the statement is true, and in fact trivial. For the equation to possibly hold, both sides must be defined, and that restricts the domain to $D\cap D'$. Once you have that, the definition of inverse functions makes the conclusion immediate.
Without additional assumptions, the claim is false. The claim is equivalent to:
This is wrong because it assumes $D,D'$ are subsets of $\mathbb R$, which is of course in general not true. For example, consider the identity map $\mathbb C\to\mathbb C,z\mapsto z$. Then $$\{x\in\mathbb R\mid (f^{-1}f)(x)=(ff^{-1})(x)\}=\mathbb R\neq\mathbb C=\mathbb C\cap\mathbb C.$$ By extension, your proof is wrong. However, if we were to add the assumption $D,D'\subseteq\mathbb R$, then the statement is true, and in fact trivial. For the equation to possibly hold, both sides must be defined, and that restricts the domain to $D\cap D'$. Once you have that, the definition of inverse functions makes the conclusion immediate.