For the first line,
A=(1,−3,1)
and its direction vector is
d1=(1,−λ,λ)
For the second line,
B=(0,1,2)
and its direction vector is
d2=(21,1,−1)
The vector joining the points A and B is
AB=(−1,4,1)
For two lines to be coplanar,
[AB,d1,d2]=0
Therefore,
−11214−λ11λ−1=0
Expanding,
(−1)−λ1λ−1−4121λ−1+121−λ1=0
(−1)(λ−λ)−4(−1−2λ)+(1+2λ)=0
4+2λ+1+2λ=0
5+25λ=0
10+5λ=0
λ=−2
Hence,
−2