Luck. Hope this helps...
Seriously, it's not easy, you can spend a whole day trying and not get a good one. I guess that makes the shots that capture it well even more special.
I seem to remember another thread (it might have been the backfire picture thread) that mentioned capturing the flame just as it was leaving the exhaust to get a nice full flame on the picture, but again, it's more a case of luck that you hit it at the right point. Keep trying though, everyone loves to see a good backfire 👍