Solution (source code)

= Solution

With <normal vector> $(1,0,1)$, the plane through $P$ has equation $x+z=3$, also satisfied by $Q,R$. Projecting the displacement from the origin onto the unit normal gives the <distance from a point to a plane>:
$$
\boxed{d=\frac{|3|}{\sqrt{1^2+0^2+1^2}}=\frac3{\sqrt2}.}
$$
The perpendicular foot is $(3/2,0,3/2)$, which lies in that plane and confirms the distance.