The equation of a line in the intercept form is
xa+yb=1.......(1)
where a and b are intercepts on x and y axes respectively.
it is given that a+b=9⇒b=9−a.......(2)
From equation (1), we obtain
xa+y9−a=1
Also it is passing through (2,2)
2a+29−a=1
⇒2{1a+19−a}=1
⇒2{9−a+aa(9−a)}=1
⇒189a−a2=1
⇒18=9a−a2
⇒a2−6a−3a+18=0
⇒a(a−6)−3(a−6)=0
⇒(a−6)(a−3)=0
⇒a=6 or a=3
If a=3⇒b=9−3=6, then the equation of the line is
x3+y6=1⇒2x+y−6=0
And if a=6⇒b=9−6=3, then the equation of the line is
x6+y3=1⇒x+2y−6=0