This is best done using vector notation. Consider the vectors XY and XZ as given in the coordinates. Therefore:
XY = Y-X = (2,λ)
XZ = Z-X = (λ+1,2)
Hence, if we take the dot product of XY and XZ, we would get the following:
XY . XZ = (2 x (λ+1)) + (λ x 2) = 4λ + 2 = 0 (As a dot product of 0 indicates that the two vectors are perpendicular)
As a result, by rearranging the equation, we get that
λ = - 1/2
Therefore, if angle YXZ is 90° then the value of
λ is - 1/2.
TO verify using coordinate geo, let XY = λ/2 and XZ = 2/(λ+1)
Hence, by doing XY*XZ = λ/2 * 2/(λ+1) = λ/(λ+1) = -1
Therefore, λ = -λ - 1 => 2λ = -1 => therefore, λ =
- 1/2
Correct me if I'm wrong.