Solution (source code)

= Solution

An isometry sends the geodesic through $P,Q$ to the imaginary axis and sends the two points to $ir$ and $i/r$ for some $r>0$. The transformation
$$
z\longmapsto-\frac1z
$$
belongs to $PSL(2,\mathbb R)$ and exchanges $ir$ with $i/r$. Conjugating it back gives an orientation-preserving isometry exchanging $P$ and $Q$.

For uniqueness, the quotient of two such isometries fixes both $P$ and $Q$. An orientation-preserving hyperbolic isometry fixing two distinct interior points fixes their connecting geodesic and both tangent directions there, hence is the identity. Therefore the exchanging isometry is unique; geometrically it is the <hyperbolic half-turn> about the midpoint of the segment $PQ$.