if the circles aren't overlapping, there are 4 common tangents:
you can determine 2 of them this way: draw the line connecting the circle's centers. Draw the diameters perpendicular on these lines for each circle. join the points of intersection by twos, so that they don't intersect.
a natural example for this is the bycicle chain (the chain draws 2 tangents to the circles)
the other two tangents... I just now they intersect.
if the circles intersect, but one dose't include the other, there are 2 tangets, found as above.
if one circle includes the other, they do not have common tangents
Understanding a problem in a natural way will lead to a natural solution
I assume c1 and c2 are the centers (structures with x and y) and r1 and r2 are the radiuses.
if (dist(c1, c2) < r1+r2) circles are overlapping
if (dist(c1,c2) +r1 < r2) circle 2 includes circle 1
if (dist(c1,c2) +r2 < r1) circle 1 includes circle 2
else your circles are distinct
if your circles are distinct or overlapping, you can find the equations of 2 tangents by implementing what I've told you before, and that's not a short task!
You should first find the equation of c1c2.
then find the equations of the perpendiculars on c1c2 through c1 and c2
these intersect the circles in a1, b1 respectively a2, b2
determine these points from perpendicular equation + circle equation
use a1 and a2 in c1c2 equation and see if the result has the same sign (if so, they are on the same side of c1c2). If they aren't, switch a1 with b1
now, the equations of a1a2 and b1b2 are the equations of 2 common tangents
I would hold equatinos as y = mx + n
to use a1 here means m*a1.x + n - a1.y (and use the result)
this may not be the shortest way, but it is the math way to do this
Understanding a problem in a natural way will lead to a natural solution