You need to take it to the dealer. It's not like pairing a bluetooth device, they need to delete the previous key from the car and also pair the new key. This can only be done with the computer systems they have.
2014 BMW X5 xDrive 35d- Space Gray-Canberra Beige Dakota Leather-Fineline Oak Wood Trim-ZDA/ZCW/417/4FF/4NB/5DL/688
2013 BMW 535i GT- Neptune Blue-Venetian Beige Dakota Leather-Fineline Matte Wood Trim-ZCW/ZVP/2ST/3AG/416/677
2010 BMW X5 xDrive 48i / 2005 BMW X5 30i / 2003 BMW 745Li
2001 BMW X5 30i / 1995 BMW 525i