lets the equation of line is x/a +y/b=a
where a and b are intercept on x and y axis respectively now given that
a+b=1 ---------(1)
and a.b=-6 -----(2)
put the value of b in equation (2) from equation (1)
a.(1-a)=-6
a-a2 =-6
a2 -a-6=0
solve this equation you will get the two value of a -2 and 3
when a=-2 b=3
and when a=3 b=-2
hence two lines are possible
first is x/-2 + y/3=1
and second is x/3 + y/-2 =1