Here is a hint for a method which avoids calculus:
The line $y=ax+b$ is a tangent to a quadratic such as $y=x^2$ if and only if the quadratic equation you get by solving these equations simultaneously has a double root. This will give you an equation which must be satisfied by the unknowns $a$ and $b$.
You can do the same for the line $y=ax+b$ and your other quadratic, then solve the two simultaneous equations to find $a$ and $b$.