Family of planes The equation of a plane passing through the line 
$$\frac{x-1}{1} =  \frac{y-2}{1} = \frac{z-2}{-2} $$ and making an angle of $30 ^\circ$ with the plane 
$$ x + y + z  = 5$$
is: 
In the solution is assumed that the equation of plane is 
$$( x -y+1) +r(2y+z-6)=0$$
 and then by using the condition of angle between planes they find $r$ and the equation of the plane.
So please explain why did they assume such an equation of the plane and is there any other way of doing this?

First of all, the equation represents a plane for all r. Each r is corresponding to a different plane. If you write the given line in parametric form and substitute into the equation, the equality holds for all r. 
