First, you must delete your save file completely. In order to do that, go to the main screen of the game (where you see the legendary) and press Up, Select, and B at the same time to prepare to delete your save file. Then to get your Memory Links back all you should have to do is re-use your Pokémon Black/White cartridge on your Pokémon Black/White 2 cartridge. I'm not sure what point of your game you have to be at to get these memories (probably the end, or any point).
I think deleting the actual Black/White 2 save data stored on your DS/3DS might be necessary to get the Memory Links back, but don't do that immediately. And don't accidentally delete your Black/White (without the 2) save data from your DS/3DS (unless there's only one save file, then you can't delete anything). Do it if re-using cartridges doesn't work but I doubt you'll have to.
I hope I helped!
This is what inspired me to make my answer, but some of it is just what I said as a comment.