Properties of the matrix square root
Note that we have
$$A^{-1}B=A^{-1/2}(A^{-1/2}BA^{-1/2})A^{1/2}=:A^{-1/2}CA^{1/2}.$$
So if $C=QDQ^*$ is an eigen-decomposition of the HPD matrix $C$, then
$$A^{-1}B=A^{-1/2}QDQ^*A^{1/2}=XDX^{-1}, \quad X:=A^{-1/2}Q,$$
is the eigen-decomposition of $A^{-1}B$. With $(A^{-1}B)^{1/2}=XD^{1/2}X^{-1}$, we get
$$
A(A^{-1}B)^{1/2}=AXD^{1/2}X^{-1}=A^{1/2}QD^{1/2}Q^*A^{1/2}=A^{1/2}(A^{-1/2}BA^{-1/2})^{1/2}A^{1/2}.
$$