Actually there are only 2 unknowns

the tangent lines at (a,f(a)) and (b,f(b) respectively are:

1)y= 2a (x-a) + a^2

2) y= (-2b+6)(x-b) - b^2 + 6b -5

The slopes are the same so 2a = -2b + 6

or a= -b+3

Also if the lines tangent at (a,f(a)) and (b,f(b) are the same then 1) must intersect 2) at (b,f(b)

So -b^2 + 6b - 5 = 2a (b-a) + a^2

so we have the system:

3) a= -b+3

4) -b^2 + 6b - 5 = 2a (b-a) + a^2

using 3) in 4)

-b^2 + 6b -5 = 2(-b+3)(b- (-b+3)) + (-b+3)^2

expand and solve

See attachment