I found the following on the iKeyless website, which indicates that you cannot program the key yourself and would need the dealer or a locksmith to do it.
Key Cutting/Programming: Programming instructions are not included.
This device requires cutting and programming by a dealership or
locksmith. The procedure takes only a few seconds to complete and many
dealerships will do it for free as a courtesy. If your dealer does
charge a fee, local locksmiths usually charge much less to remain
competitive.
Then on locksmithcharley.com it says:
Their (Mazda's) newer "80-bit" offering 5913441 has "SA" stamped into the key.
Strattec's 5913441 and ILCO's H84PT 80-bit key blanks are backwards
compatible meaning that they will work in vehicles with a 40-bit
system. Keys cut on 40-bit blanks will not start vehicles requiring
80-bit keys.
Which leads me to believe that the your car, being "newer", would use an 80 bit key. If your key has an "SA" stamped in it then you have an 80 bit key.
I think a 2013 Mazda 5 needs an 80 bit key based on information on transponderisland.com.
Mazda Flip Blade Part with Transponder Chip 80 Bit Related Products
2012 - 2013 Mazda Transponder Key 80 Bit - TI Brand
2012 - 2013 Mazda Transponder Key 80 Bit - TI Brand
2005 - 2013 Mazda 2 5 CX-7 CX-9 Remote Flip Key - 3B Remote Part BGBX1T478SKE125-01
2005 - 2013 Mazda 2 5 CX-7 CX-9 Remote Flip Key - 3B Remote Part BGBX1T478SKE125-01
2004 - 2010 Mazda Remote Flip Key Blade
2004 - 2010 Mazda Remote Flip Key Blade
2003 - 2013 Mazda Transponder Key MAZ24RT17
2003 - 2013 Mazda Transponder Key MAZ24RT17
...
I can't find if the "G2YA-76-2GXB" is 80 bit but, if that is the part number of the key that came with your car then I think it would be 80 bit since your Mazda 5 seems to be 80 bit compatible and the 40 bit keys aren't backwards compatible with 80 bit systems.
It sounds like an 80 bit key will work with either system and is therefore your safest bet.