analytic geometry – Prove that $ mathbf{Sim}_{mathcal{A}}(P)=mathbf{O}(2) $

For $ P(mathbf{x}) = mathbf{x} cdot mathbf{x} – 1 $ proof algebraically that $ mathbf{Sim}_{mathcal{A}}(P)=mathbf{O}(2) $

Where, $ mathbf{Sim}_{mathcal{A}}(P):={g in mathcal{A}(2) mid P circ g=P} $


My attempt

$ subseteq$) Since $ mathbf{Sim}_{mathcal{A}}(P):={g in mathcal{A}(2) mid P circ g=P} $, note that

$
begin{align*}
P circ g & = P \
(P circ g)(mathbf{x}) & = P(mathbf{x}) \
(P(g(mathbf{x})) & = mathbf{x} cdot mathbf{x} – 1
end{align*}
$

Thus, observe that
$$ P(mathbf{x}) cdot P(mathbf{x}) = (mathbf{x} cdot mathbf{x} – 1) cdot (mathbf{x} cdot mathbf{x} – 1) $$
$$ P(g(mathbf{x})) cdot P(g(mathbf{x})) = (mathbf{x} cdot mathbf{x} – 1) cdot (mathbf{x} cdot mathbf{x} – 1)$$

It follows

$
begin{align*}
P(mathbf{x}) cdot P(mathbf{x}) & = P(g(mathbf{x})) cdot P(g(mathbf{x}))\
%
mathbf{x} cdot mathbf{x} & = g(mathbf{x}) cdot g(mathbf{x})
end{align*}
$

$$ mathbf{Sim}_{mathcal{A}}(P) subseteq mathbf{O}(2) $$

Not sure if that last step is correct (applied the inverse on both sides and distributed it)

$ supseteq $) Suppose that $ g in mathbf{O}(2) $. Henceforth

$
begin{align*}
(P circ g)(mathbf{x}) cdot (P circ g)(mathbf{y})
& = P(g(mathbf{x})) cdot P(g(mathbf{y}))\
& = P(g(mathbf{x}) cdot (g(mathbf{y}))\
& = P(mathbf{x} cdot mathbf{y})\
& = (mathbf{x} cdot mathbf{x} -1) cdot (mathbf{y} cdot mathbf{y} -1)
end{align*}
$

$$ boxed{(P circ g)(mathbf{x}) cdot (P circ g)(mathbf{y}) = P(mathbf{x}) cdot P(mathbf{y})} $$

Since $ g in mathbf{O}(2) $, thus

$$ mathbf{O}(2) subseteq mathbf{Sim}_{mathcal{A}}(P) $$


The proof doesn’t seem the be correct when applying the inverse in the first part and for the second part I have my doubts if the orthogonality of $g$ is being applied correctly