For refernce: In the figure, $P$ and $Q$ are points of tangency.
Calculate $PQ$ if the side of square $ABCD$ measures $a$.

My progress:
[![enter image description here](https://i.stack.imgur.com/vA5Sq.jpg)](https://i.stack.imgur.com/vA5Sq.jpg)

$AQ = AD (tangents)\\\therefore AQ = AD = a\\similarly; AP = AQ = a\\
\therefore \triangle APD: \triangle AQG: \triangle APQ \rightarrow isosceles\\
EG =GH= \frac{a}{2}\\
\angle AGD = 45^o \therefore AG = \frac{a\sqrt2}{2}$

any hint where to use PQ...