I have two stars, both of which have Balmer lines at the same wavelength positions. The depths of the Balmer lines on each star are different, and the stars are different as well.
Why does this pattern exist?
Assuming by "depths of the Balmer lines" you mean how broad they are, this information can be used to determine the (surface) temperature of the star1. In particular, and that may be the only thing the homework question is about, the star with the broader Balmer lines have the higher surface temperature.
The thermal Doppler broadening (not Doppler shift) is correlated with temperature and depends on three factors:
The first factor is the same for any particular Balmer line, and the second factor is the same as the Balmer lines are all from emissions from hydrogen. Thus, in this case, the broadening only depends on temperature (assuming thermal Doppler broadening is the only effect).
1. Spectral linewidth - "In astronomy and plasma physics, the thermal Doppler broadening is one of the explanations for the broadening of spectral lines, and as such gives an indication for the temperature of observed material."
I'm going to obfuscate here to avoid directly answering the question!
Well it begins with an assumption that physics is the same throughout the universe, which seems pretty fair to me. Given that physics is the same throughout then we can expect phenomena that look similar to have similar causes. This can be a trap and isn't perfect reasoning but it applies in your question...