The average (arithmetic mean) age of a group consisting of doctors and lawyers in 40. If the doctors average 35 and the lawyers 50 years old, then the ratio of the numbers of doctors to the number of lawyers is 
$\textbf{(A)}\ 3: 2\qquad\textbf{(B)}\ 3: 1\qquad\textbf{(C)}\ 2: 3\qquad\textbf{(D)}\ 2: 1\qquad\textbf{(E)}\ 1: 2$
Let $d$ be the number of doctors and $l$ be the number of lawyers.  The average age of the doctors is $35$, so the sum of the doctors' ages is $35d$.  The average age of the lawyers is $50$, so the sum of the lawyers' ages is $50l$.  With the two information, we can write an equation.
\[\frac{35d+50l}{d+l} = 40\]
\[35d+50l=40d+40l\]
\[10l=5d\]
\[\frac{d}{l} = 2\]
The ratio of the number of doctors to the number of lawyers is $\boxed{\textbf{(D)}\ 2: 1}$.