Alternatively, you don't even need the expression for $A^{-1}$, just use
$A \in O_n(G, K) \Rightarrow G = A^\top G A \text{ invertible} \Rightarrow A \text{ invertible}$
and
$A \in O_n(G, K) \Rightarrow A^\top G A = G \Rightarrow G = (A^{-1})^\top G A^{-1} \Rightarrow A^{-1 }\in O_n(G, K)$