To answer your question, polearm master's second perk would activate once the enemy enters your reach (10'), and therefore a hit would stop him at that distance.
Keep in mind, however, that unless you have the Tunnel Fighter Fighting style (see below), you cannot use this more than once per round, as opportunity attacks use your reaction. You also sacrifice any other options for which you would need a reaction, which can make some feel like a one-trick pony during extended fights.
This combination is also extremely situationnal and requires a few conditions to be met. You must be able to reach the enemies (faster enemies might skirt around you or, for some, fly over/burrow under), and they must rely solely on 5' range melee attacks, which becomes void at later levels.
As for the use of Battlemaster, once again using your superiority die for this blocks other options which might be more useful or provide a more fun combat encounter. Also like your reaction, superiority die are a limited resource.
Last but not least, this requires 2 feats, and while this is not a problem for a fighter that has 7 APIs, it is not ideal for other classes who only have 5.
Here, however, are a few positive aspects of this combination:
- Tunnel Fighter (UA) removes the limit imposed by a single reaction. If you choose your positioning carefully, you can therefore stop an entire enemy party in a narrow passage, so long as those enemies are within melee range, and you don't miss an attack, of course. If you are a DM, consider this carefully before including this material in the game.
- This feat is a great opportunity for cooperative play! If you have casters with mold earth, movement-restricting spells or wall spells, use this to your advantage! Since you won't necessarily be doing mountains of damage, you can hold the front line while your allies pelt your enemies with ranged attacks while funneling your adversaries into your reach.
- Take it with the Mobile Feat. If you're hell bent on spending ASIs on feats instead of ability score upgrades, take the mobile feat, which will allow you to back off on your turn after hitting the enemy without taking an attack opportunity from it is it has 10' range as well.