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.
Let C be the Amperian Loop
We know that the angle between B and dl is acute inside the bar and hence is positive
> 0 (i.e. Positive) … (1)
Hence Lines of B run from South Pole (S) to North Pole(N) inside the bar magnet.
From (1) we know
has to be < 0
This can only happen is is negative.
This means that direction of B is from North Pole to South Pole outside the magnet.