[Tex/LaTex] How to draw tangent to two touching circles and marking the points

circlestikz-pgftkz-collection

This question may seem repetitive to many, but as I am very new to Latex, even after reading many posts, could not get to draw what I wanted, so asking.
I want to draw as the following.
enter image description here

I have written the following code, Please help further.

\documentclass[11pt, oneside]{article}
\usepackage{geometry}                       % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                          % ... or a4paper or a5paper or ... 
\geometry{landscape}  
\usepackage{tikz}   % TeX will automatically convert eps --> pdf in pdflatex    
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{gensymb}
\usepackage{tkz-euclide}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{calc}
\usepackage{graphicx}
\usetikzlibrary{plotmarks}  
\title{}
\author{}

\begin{document}
\begin{tikzpicture}

\draw (0,0) circle(2) node [left] {P};
\draw (3.5,0) circle(1.5) node [below] {Q};
\draw (0,0) -- (14,0) node [right] {O};

\newcommand*{\Radius}{2cm}%
   \coordinate (Origin) at (0,0);
   \coordinate (O) at (14,0);% External point

\tkzDrawCircle[R](Origin,\Radius)
   \tkzTangent[from with R= O](Origin,\Radius)  \tkzGetPoints{R}{I} 

   \tkzDrawSegments[ultra thick](O,R)% First tangent
   \tkzDrawSegments[ultra thick](O,I)% Second tangent
\end{tikzpicture}
\end{document}

Best Answer

I give my personal answer because It's preferable to avoid to mix syntaxes ( tikz and euclide ) and I added some remarks. I take big parts from hpesoj626's answer.

Firstly, I prefer to use several parts in my code, I created tkz-euclide to do this: definition, calculations, drawings and labels. If you study tikz enough, you will be able to use only tikz and to put tkz-euclide in the trash.

Remarks about definitions

  1. You can use coordinate here from tikz but if you use another system of coordinates from tkz then you can go down some complications.
  2. \pgfmathsetmacro is more tikzien but you need to add the unity after

Remarks about calculations : none it's fine

Remarks about drawings :

  1. In general with tkz-euclide macros come by pair like \tkzDrawSegment and \tkzDrawSegments. The second is to draw several objects with the same options but if you need specific options, then you need to use the first form.
  2. option add. I added to tkz-euclide the possibility to use tikz option but I added somme specific option that I created. You can use add = n and m to extend a line (n and m are a percent of the length of the line. I prefer this possibility because it's easy to add half of a line or to double the line.

Remarks about labels :

The same remarks about the pair of macros. You can add labels with general options or with specific ones.

Conclusion tkz-euclide is useful only if you need to draw several pictures and if you want to write rapidly your code but for one picture, I think it's preferable to study tikz. With tkz-euclide you need to know some options from tikz.

So a tkz-euclide solution is

\documentclass{article}
\usepackage{tkz-euclide}

\begin{document}
\begin{tikzpicture}[scale=.8]

% definitions
\tkzDefPoint(0,0){Origin}
\tkzDefPoint(3.5,0){Q}
\tkzDefPoint(14,0){O}
\pgfmathsetmacro{\Radius}{2}

% calculations
\tkzTangent[from with R = O](Origin,\Radius cm)  \tkzGetPoints{R}{I} 
\tkzInterLC[R](Q,Origin)(Q,1.5cm) \tkzGetPoints{M}{N}
\tkzTangent[from=O](Q,M) \tkzGetPoints{S}{II}

% drawing
\tkzDrawCircle[R](Origin,\Radius cm)
\tkzDrawCircle(Q,M)
\tkzDrawSegments[ultra thick,orange,add = 0 and .2](O,R O,I)
\tkzDrawSegments[thick,gray](Origin,O)
\tkzDrawPoints(Origin,O,Q,R,I,II,S)

% labels
\tkzLabelPoints(R,S,Q,I,II,O)
\tkzLabelPoint[below right](Origin){$P$}
\tkzLabelPoints[above,text=red](R,S)
\tkzLabelPoints[above,text=blue](I,II)
\end{tikzpicture}
\end{document}

enter image description here