Since the gradient of l1 is given by:
m = (b-4)/(a-3) = -3/2
We can rearrange this equation to get:
2(b-4) = -3(a-3)
2b - 8 = -3a + 9
3a + 2b = 17
Now, we know that l2 is perpendicular to l1, which means that the product of their gradients is -1. Therefore, the gradient of l2 is given by:
m2 = 2/3
Using the gradient-point form of a straight line, we can write the equation of l2 as:
(y - b) = (2/3)(x - a)
Since l2 passes through point Q(a, b), we can substitute these values to get:
(y - b) = (2/3)(x - a)
(y - b) = (2/3)(x - 3 + 3 - a)
(y - b) = (2/3)(x - 3) - (2/3)(a - 3)
y = (2/3)x - 2 + (2/3)(a - 3) ...eqn(*)
We also know that l2 passes through point R(2, -1), which means that this point satisfies the equation of l2. Substituting these values into eqn(*), we get:
-1 = (2/3)(2) - 2 + (2/3)(a - 3)
-1 = (4/3) + (2/3)(a - 3)
-3 = 2a - 6
a = 3
Substituting a = 3 into the equation of l1 that we derived earlier, we get:
3a + 2b = 17
9 + 2b = 17
2b = 8
b = 4
Therefore, the values of a and b are a = 3 and b = 4.