Really loud exhaust only on cold startup

Depending on how much metal is left, it may be better to weld the flange to a coupling, then either clamp or weld the coupling to the rusted pipe.