Step 1: Recall the energy formula.
When an electron jumps between energy levels in a hydrogen-like ion, it gives out a photon. The energy of that photon depends on the atomic number $Z$ and on the two levels $n_1$ and $n_2$. The simple rule is that the energy is proportional to $Z^2$ times the bracket below.
Step 2: Write what "proportional to" means here.
We can drop all the constants and just compare using \[ E \propto Z^2 \left( \frac{1}{n_1^2} - \frac{1}{n_2^2} \right) \] This is enough because the question only asks for a ratio.
Step 3: Pick the right levels for the lowest frequency Lyman line.
The Lyman series always ends at $n_1 = 1$. Lowest frequency means lowest energy, and the smallest jump down to level 1 comes from level 2. So for the $Li^{2+}$ line we use $n_1 = 1$ and $n_2 = 2$, with $Z = 3$.
Step 4: Find x for Li$^{2+}$.
Put the numbers in. \[ x \propto 3^2 \left( \frac{1}{1^2} - \frac{1}{2^2} \right) = 9 \times \left( 1 - \frac{1}{4} \right) = 9 \times \frac{3}{4} = \frac{27}{4} \]
Step 5: Pick the right levels for the second Balmer line.
The Balmer series always ends at $n_1 = 2$. The first Balmer line comes from level 3, so the second Balmer line comes from level 4. For $He^{+}$ we use $n_1 = 2$, $n_2 = 4$ and $Z = 2$. \[ y \propto 2^2 \left( \frac{1}{2^2} - \frac{1}{4^2} \right) = 4 \times \left( \frac{1}{4} - \frac{1}{16} \right) = 4 \times \frac{3}{16} = \frac{3}{4} \]
Step 6: Take the ratio.
Now divide x by y. The quarters cancel nicely. \[ \frac{x}{y} = \frac{27/4}{3/4} = \frac{27}{3} = 9 \] So the ratio is 9 to 1. \[ \boxed{x:y = 9:1} \]