[Math] Derivation of formula for shortest distance between two skew lines.

3dgeometry

I am a student of 12th standard, studying 3D Geometry currently. I am quite perplexed by the following proof regarding the formula of the shortest distance between two skew lines, I have underlined the confusing text and drawn a red rectangle over the equation that I feel is wrong (the reason why I think its wrong is because I created a 3D Model of such a figure where I made two skew lines, line representing ST, PQ(mentioned in the proof below) and the I tried to create a projection of ST on PQ in order to check whether the equation PQ = ST cos θ is correct or not, and I observed that it is not, PQ is shorter than ST cos θ , I don't know how to upload that model here so I am providing the following link https://p3d.in/bPC8K .)

HELP me understand this. Thank for you help in Advance.
This is the proof given in my school textbook:
enter image description here

Best Answer

$\theta$ mentioned here is the angle between $PQ$ and $ST$.

$PQ$ is taken as the shortest distance between the two skew lines.And then by cross product of $b_1$ and $b$, we have found out a unit vector $\hat{n}$.

$$PQ=ST\cos(\theta)$$

In this equation, we are taking projection of $ST$ vector on $PQ$ and for that we just use the $\hat{n}$ vector that we found out earlier.