Step 1: Understanding the overtone frequencies.
The frequency of the first overtone for an open pipe is \( f_2 = 2f_1 \), where \( f_1 \) is the fundamental frequency, and for a closed pipe, the first overtone is the third harmonic, \( f_2 = 3f_1 \).
Step 2: Frequency and length relationship.
The frequency of an organ pipe is inversely proportional to its length. So, for the same overtone frequencies, the ratio of the lengths of the pipes is given by:
\[
\frac{L_{\text{open}}}{L_{\text{closed}}} = \frac{4}{3}
\]
Step 3: Conclusion.
The ratio of the lengths of the open and closed pipes is \( 4:3 \), so the correct answer is (D).