It is possible that there is an easier way to do this, but anyway:

Let the common tangent meet the first curve at and the second curve at . Then the derivatives of those curves at those points are equal. Call this gradient m. then (draw a diagram if you are unsure of this one). This gives

5 equations for 5 unknowns, which surprisingly solve quite easily. Remember that you only need one point and m to find the equation of the tangent.