Given lines are :
3x+y=4...(i)
x−ay+7=0 .... (ii)
bx+2y+5=0 .... (iii)
It's said that these lines form three consecutive sides of a rectangle.
So,
Line (i) and (ii) must be perpendicular
Also, line (ii) and (iii) must be perpendicular
We know that, for two perpendicular lines the product of their slopes will be −1.
Now,
Slope of line (i) is
3x+y=4⇒y=−3x=4
Hence, slope (m1)=−3
And, slope of line (ii) is
x−ay+7=0⇒ay=x+7
y=(1a)x+7a
Hence, slope (m2)=1a
Finally, the slope of line (iii) is
bx+2y+5=0⇒2y=−bx−5
y=(−b2)x−52
Hence, slope (m3)=(−b2)
As line (i), (ii) and (iii) are consecutive sides of rectangle, we have
m1×m2=−1 and m2×m3=−1
(−3)×(1a)=−1 and (1a)×(−b2)=−1
−3=−a and −b2a=−1
a=3 and b=2a⇒b=2(3)=6
Thus, the value of a is 3 and the value of b is 6.