Basically you could do it like this:
git reset --hard 9ca4bc3
git merge --no-ff 9bf6ca0
Unfortunately you did tell, where your branches currently point to. Probably what you really want is something like this:
git checkout refactor
git reset --hard 9ca4bc3
git checkout develop
git reset --hard 9bf6ca0
git merge --no-ff refactor
You also did not specify where your upstream branches point to. Watch out not to change any commits already published.
git rebase
does not make sense in your case. It just takes your commits and adds them to the new base. In your case the old base seems to be exactly the same as the new base, therefore the result is exactly the same as before. (Only the merge commit is missing.)