To get Alakazam, you must train Abra until level 16. At level 16, it will evolve into Kadabra. Finally, you'll need to trade with someone, and then trade back to get your Alakazam.
Sorry if I confused you.
More information on Alakazam can be found here
If your Kadabra didn't evolve when you traded it to your friend, then look at my comment above
Hope I helped
Sources: The comments above, and this website.