<h3>Answer: a = 4, b = 2</h3>
===================================================
Explanation:
Multiply both sides by the denominator a+b*sqrt(7). Then expand out the RHS and get that RHS into the form p+q*sqrt(7), where p and q are algebraic expressions.
2+4*sqrt(7) = (4-sqrt(7))(a+b*sqrt(7))
2+4*sqrt(7) = 4(a+b*sqrt(7))-sqrt(7)*(a+b*sqrt(7))
2+4*sqrt(7) = 4a+4b*sqrt(7)-a*sqrt(7)-7b
2+4*sqrt(7) = (4a-7b)+(4b-a)*sqrt(7)
The (4a-7b) part on the RHS matches up with 2 on the LHS, so
2 = 4a-7b or 4a-7b = 2
Similarly, the (4b-a)*sqrt(7) on the RHS matches up with 4*sqrt(7)
So,
4*sqrt(7) = (4b-a)*sqrt(7)
4 = 4b-a
-a+4b = 4
--------------
We have this system of equations
4a-7b = 2 and -a+4b = 4
Let's solve the second equation for a
-a+4b = 4
4b = 4+a
4b-4 = a
a = 4b-4
Plug this into the first equation; solve for b.
4a - 7b = 2
4( a ) - 7b = 2
4(4b-4)-7b = 2
16b-16-7b = 2
9b-16 = 2
9b = 18
b = 2
From here, we can compute the value of 'a'
a = 4b-4
a = 4(2)-4
a = 4
Your method of rationalizing the denominator would work out, though it seems like it would involve more steps.