Step 1: Read what the timing tells us.
A ball thrown straight up keeps rising until its velocity becomes zero - that instant is the maximum height. The student releases the second ball exactly when the first reaches the top, and the throws are spaced $3\ \text{s}$ apart. So the climb to the top takes the same $3\ \text{s}$.
Step 2: Note what we want.
We need the maximum height $H$, given the time of ascent $t = 3\ \text{s}$ and $g = 10\ \text{ms}^{-2}$.
Step 3: Find the launch speed.
At the top the upward velocity is zero, so using $v = u - gt$ with $v = 0$: $$u = gt = 10 \times 3 = 30\ \text{ms}^{-1}.$$
Step 4: Pick a kinematic equation for the height.
With known launch speed $u$ and the fact that velocity at the top is zero, use $v^2 = u^2 - 2gH$ and set $v = 0$: $$0 = u^2 - 2gH.$$
Step 5: Solve for $H$.
Rearranging gives $$H = \frac{u^2}{2g} = \frac{(30)^2}{2 \times 10} = \frac{900}{20} = 45\ \text{m}.$$
Step 6: Cross-check with the falling distance.
The fall back from the top also lasts $3\ \text{s}$ from rest, so $H = \tfrac{1}{2}gt^2 = \tfrac{1}{2}\times 10 \times 9 = 45\ \text{m}$ - the two methods agree, confirming the answer.
\[ \boxed{H = 45\ \text{m}} \]