How do I defeat a Pyro being a Pyro?
Solution 1:
I would say, at flamethrower range, PvP is mostly about who gets the drop on the other, and who has the better dodging/tracking/strafing skills.
However, if you have a shotgun and the other Pyro has a flare gun, you have a huge advantage at medium range, and you should seek to remain at that range.
Against an aggressive opponent, you can sometimes control your range between them. Jump back out of flamethrower range as he chases you with the flamethrower, then close in and switch weapons if he switches to shotgun while still moving forward. Additionally, you can force a medium range encouter with the airblast, allowing your (hopefully) greater dueling skills to win the day.
Since two good pyros will probably be doing this, it often devolves into a shotgun duel.
Solution 2:
Degreaser + Reserve shooter. Afterburn damage penalty does not apply and you can get mini-crits on them with the reserve shooter when they're puffed up in the air. Degreaser also lets you switch weapons faster.