RX-8 wheels have the same stud pattern, offset with CX-7 wheels EXCEPT RX-8 have lower load rating due to lighter weight of the car
You can fit them into your CX-7 but driving over a big pot-hole the wheels may break
I did try and Mazda dealer told me not too as they MAY void warranty ...