5. Given the lines $l_{1}: x-2 y-1=0$ and $l_{2}: 2 x-y-2=0$, a line is drawn through the point $Q(2,-1)$ intersecting $l_{1}$ at $A$ and $l_{2}$ at $B$. $P$ is a moving point on the line $AB$ different from $Q$, and $\frac{|A P|}{|P B|}=\frac{|A Q|}{|Q B|}$. Find the locus of point $P$.
5. From $(x-2 y-1)(2 x-y-2)=0$, we have $2 x^{2}-5 x y+2 y^{2}-4 x+5 y+2=0$. Using property 8, in the above equation, substituting $2 x$ for $x$, $\frac{2 y-x}{2}$ for $x y$, $-y$ for $y^{2}$, $\frac{x+2}{2}$ for $x$, and $\frac{y-1}{2}$ for $y$, we get the equation $x-y-1=0$:

The line passing through point $Q$ and intersecting line $l_{1}$, parallel to line $l_{2}$, is $2 x-y-5=0$. Its intersection with the line $x-y-1=0$ is $(4,3)$, which is clearly not a point on the desired trajectory. Similarly, the line passing through point $Q$ and parallel to line $l_{1}$ is $x-2 y-4=0$. Its intersection with the line $x-y-1=0$ is $(-2,-3)$, which is also not a point on the desired trajectory. The intersection of lines $l_{1}$ and $l_{2}$ with the line $x-y-1=0$ is $(1,0)$, which is not a point on the desired trajectory.
The trajectory of point $P$ is the line $x-y-1=0$ excluding the points $(3,4),(-2,-3),(1,0)$.