If you've accidentally blocked someone, the first thing you need to do is to unblock it. After this procedure, wait a few days and then attempt to re-add them. You can try right away, but I doubt it will work. Certain operations have a time limit in which they can be used again. Alternatively, ask your friend to add you again. It's possible that it will this way.