There are a few threads on this already. Most cover using Yakima Q-Tower system ($450-$550 for two bikes) or the Thule Rackpack ($275 for two bikes and hits the hatch when open.)
There is another option...
You can use any bike carrier that is compatible with the Yakima Mighty Mounts. Yakima doesn't make a Mighty Mount for the P5 though. What you have to do is order the bike rack attachment brakets from the mazda accessories catalog. (I recommend getting them from MazdaStuff.com) and use them in place of the Mighty Mounts. The trick is that you have to mount the carrier backwards on the car so that the front of the bike faces the rear of the car (at least with the Yakima King Cobra). Total spent $280 for the brackets and 2 Yakima King Cobra mounts and no hitting the hatch.
There is another option...
You can use any bike carrier that is compatible with the Yakima Mighty Mounts. Yakima doesn't make a Mighty Mount for the P5 though. What you have to do is order the bike rack attachment brakets from the mazda accessories catalog. (I recommend getting them from MazdaStuff.com) and use them in place of the Mighty Mounts. The trick is that you have to mount the carrier backwards on the car so that the front of the bike faces the rear of the car (at least with the Yakima King Cobra). Total spent $280 for the brackets and 2 Yakima King Cobra mounts and no hitting the hatch.