1. He used to take a walk in the park, didn't he?

2. Didn't he used to take a walk?
3. Didn't he use to take a walk?

4. He used to take a walk in the park, usedn't he?
5. He used to take a walk in the park, usen't he?
6. Usedn't he to take a walk?
7. Usen't he to take a walk?
-------------------------------------
They seem to be a little complicated? Which ones are grammatical? Which ones are not?

1 and 2 are correct. The others are not.

You can see the difference between 2 (correct) and 3 (incorrect), right?

In 4-7, "usedn't" is incorrect. That's not a tag line used in English.