Do you have an H pipe? If so you will need to remove the nuts and bolts holding the pipes on to the manifolds. These usually don't come off without heat first. Wire brush the exposed ends of the bolts, heat them to a dull orange, let them cool a few minutes and then remove the nuts.

If you don't have an H pipe you might be able to change the block gaskets and leave the pipe on the manifold which will save a step.

Next is the manifold to block hardware. First use a wire brush on the studs that are sticking out past the nuts and clean off the threads remove the crust. Usually the studs will not come out of the head, yes there is coolant behind all of the studs.

Put the WD40 away and use a better penetrant as listed above.

I use Fel-Pro exhaust manifold gaskets. The pipe gaskets that come with them are the wrong size so order the larger 2.5" flange gaskets separately. If you have any pitting in the flanges the muffler paste can assist in sealing the gaskets. Follow directions on the package.