You have to make a spacer by grinding a pipe coupling or cap so it fits snug in the header at the weld where the flange is welded on. If you don't, the pry bar pipe can bend and distort the flange and you will have exhaust leak problems.
I borrowed a MAPP Turbo Tourch from the plant plumber at work. It has a large tip that throws a lot of heat over a wide area and won't burn holes like oxy/acetylene. This worked good on an FMF Gnarly header, thinner Doma should be eaiser. Study the pipe and see exacly how it was bent, then attempt to reverse it.
If you get it to fit good again, or better yet have access to a new one, take mesurements. Then you have a good baseline for a repair.
"Cruiser" here fixes pipes for friends(not a buisness). He may have some tips to share.