Use (i) the Ampere's law for H and (ii) continuity of lines of B, to conclude that inside a bar magnet, (a) lines of H run from the N - pole to S - pole, while (b) lines of B must run from the S-pole to N - pole.

Hint: Use the ampere-circuital law.
Step 1: Consider a magnetic field line of B through the bar magnet as given in the figure below.

The magnetic field line of B through the bar magnet must be a closed-loop.
Let C be the amperian loop. Then,
${\int }_{\mathrm{Q}}^{\mathrm{P}}\mathrm{H}\cdot \mathrm{dl}={\int }_{\mathrm{Q}}^{\mathrm{P}}\frac{\mathrm{B}}{{\mathrm{m}}_{0}}\mathrm{dl}$
We know that the angle between B and dl is less than 90$°$ inside the bar magnet. So, it is positive.
i.e.      ${\int }_{\mathrm{Q}}^{\mathrm{P}}\mathrm{H}\cdot \mathrm{dl}={\int }_{\mathrm{Q}}^{\mathrm{P}}\frac{\mathrm{B}}{{\mathrm{\mu }}_{0}}\cdot \mathrm{dl}>0$
Hence, the lines of B must run from the south pole (S) to the north pole (N) inside the bar magnet.
Step 2: According to Ampere's law,

As,                     (i.e., negative)
It will be so if the angle between H and dl is more than 90$°$, so that cos$\mathrm{\theta }$ is negative. It means the line of H must run from N-pole to S-pole inside the bar magnet.