I'm guessing the code came from Flickr, and then probably the text was added in to the link code, that's why it's all linked together.
The 2 main bits of code are these:
image
[IMG]image URL goes here[/IMG]
link
[URL=link goes here]clickable link text goes here[/URL]
So basically you'll need to take out any URL codes linking back to Flickr, and then keep/add the links and text you can.