dnd 5e – Can the Polearm Master bonus attack only be used after the main attack?

Crawford has explained the intent of the rules

Clarification about bonus actions: if a feature says you can do X as a bonus action if you do Y, you must do Y before you can do X.

So, your feat says

When you take the Attack action and attack with (…)

So you need to declare you’re attacking Keith and conduct your attack(s). You can then use your bonus action attack with a Tripping Maneuver. After that, feel free to Action Surge and (hopefully) slam a prone Keith!

This is very similar to the Shield Master bonus attack, Eldritch Knight, and Crossbow Expert rulings. Quoting an answer from the Crossbow Expert question:

While this is perhaps not as clear as it could be, the order is implicit in the logic of the description: When you take the attack option (this must happen first for the condition to be satisfied) you can use a bonus action (therefore this must happen after taking the action).

It would perhaps be better if it had been written: “then you can use a bonus action”, but omitting the “then” does not change the fact that there is a when condition.