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.
2013 BMW 535i GT- Neptune Blue-Venetian Beige Nevada Leather-Fineline Matte Wood Trim-ZCW/ZVP/2ST/3AG/416/677
2005 BMW X5 30i- Kalahari Beige-Sand Beige Nevada Leather-Dark Burl Walnut Trim-ZCW/ZPP/ZRC/508/522/609
2010 BMW X5 xDrive 48i
2003 BMW 745Li
2001 BMW X5 30i
1995 BMW 525i