If you would do me a favour, I would repay you." Yes, it's correct. It's used very rare, generally in formal way. It shows a less probability and relates to the Future!
Why is it not: "If you did me a favour, I would repay you."? It's fine.
If you would ..., I would ... If I would ..., he would ... If he would ..., she would ... These "double would" constructions almost always involve bargaining, i.e., attempts to reach an agreement that benefits both parties.