Looks like you need to take everything from the backslash until the end of the line, and surround the remainder with a block of text that duplicates the text.
So XXX\YYY becomes XXX\<a ...YYY>YYY</a> (well, pretty much ...)
Part of it is tricky, cos you need to do a bit of jiggery pokery with the spaces (turning them into +s), but let's gloss over that for now ...
The triple-\ is a bit of a red herring: the first two represent an escaped backslash (cos you've really got backslashes in your text file) and the next one opens up a \(-\) block, which surrounds a block of text that we'll pick up later with \1, which occurs twice in the replacement text, cos you really do want to see it twice in your HTML output.
To turn the spaces into +s, you need to get a bit fiddly: you could replace them all first, and then turn some of them back afterwards, I guess. Can't produce the fiddly vim business of the top of my head right now, but if I think of something inspired, I'll post it.
By the way, I'm not sure why you want to do this with mapping: I guess it would let you store the mapping and use it loads of times, but I'm not sure if you really need to do that, or if you just think that mapping is cool.
Using sed might be a bit easier: the commands are pretty much the same as vi, but it's non-interactive. (That's not the complete truth of the distinction between vi and sed, but it's close.)
Hope this helps.