rim help

So I’m getting some new rims and tires for my car for winter. I found a set of rims that were off of a 2008 G37S. They have the same bolt pattern as my car but im not sure about the hub and everything. Would anybody know if these would fit?
going on a Mazdaspeed 6.

thanks guys.

*Wheels

Look at the offsets, make sure they clear calipers.

i think the offset needs to be around 48 in order to fit