Step 1: Write the fundamental of the closed pipe A.
A pipe closed at one end has a fundamental frequency $$n_A = \frac{v}{4L_A},$$ since only a quarter wavelength fits inside.
Step 2: Write the harmonics of the open pipe B.
A pipe open at both ends has fundamental $\dfrac{v}{2L_B}$ and produces all harmonics: $1f, 2f, 3f, \ldots$
Step 3: Identify the second overtone of B.
The first overtone is the 2nd harmonic and the second overtone is the 3rd harmonic, so $$n_B' = 3\times\frac{v}{2L_B} = \frac{3v}{2L_B}.$$
Step 4: Apply the coincidence condition.
The problem says $n_A = n_B'$, hence $$\frac{v}{4L_A} = \frac{3v}{2L_B}.$$
Step 5: Cancel $v$ and rearrange.
Dropping the common $v$, $$\frac{1}{4L_A} = \frac{3}{2L_B}\ \Rightarrow\ \frac{L_A}{L_B} = \frac{2}{4\times 3} = \frac{2}{12}.$$
Step 6: Simplify the ratio.
$$\frac{L_A}{L_B} = \frac{1}{6}.$$
\[ \boxed{L_A : L_B = 1 : 6} \]