Inversion. Draw the tangents $ZT_A$ and $ZT_B$ to circles $k_A = (APXY)$ and $k_B = (BQXY)$ respectively, where $T_A$ is the point of tangency of $ZT_A$ to $k_A = (APXY)$ and $T_B$ is the point of tangency of $ZT_B$ to $k_B = (BQXY)$. Then $ZT_A = ZT_B$ since $Z$ lies on the radical axis of the two circles. Hence the circle $k$ centered at $Z$ and of radius $ZT_A = ZT_B$ passes through the points $T_A$ and $T_B$ and is orthogonal to both circles $k_A$ and $k_B$. After inversion with respect to $k$ the circles $k_A$ and $k_B$ are mapped to themselves (respectively) and the third circle $k_Z = (ABWZ)$ is mapped to a line. However, $k_Z$ is tangent to both circles $k_A$ and $k_B$ so it's image, the line, is also tangent to $k_A$ and $k_B$. So it must be the common tangent (one of the two only possible) $PQ$ (the only one that's disjoint from $k$ since $k_Z$ is disjoint from $k$ too). Since $A$ is the point of tangency of $k_Z$ and $k_A$ then it's image is the point of tangency of line $PQ$ and circle $k_A$, which is point $P$. Therefore $Z, A$ and $P$ must be collinear. The same argument holds for $Z, B$ and $Q$. Furthermore, the image of point $W \in k_Z$ must be a point on $PQ$ and it must lie on the line $ZW$. There is only one such point and that is $T$. Therefore, by the properties of inversion $ZW \cdot ZT = ZA \cdot ZP$ which is possible if and only if the points $A, P, T, W$ lie on a common circle. Analogously, $B, Q, T, W$ are also concyclic.