[subject] + prefer + [noun/verb-ing] + to + [noun/verb-ing]
[subject] + would prefer + to + [verb]
[subject] + would rather + [verb] (+ than + [verb])
Prefer and would rather both say that you like one thing more than another. They take different verb forms, so learn each one with its pattern.
Prefer is for what you usually like. The other thing comes after to. When you compare two activities, use the -ing form for both.
Would prefer ('d prefer) is for what you want now or at a certain time. A verb after it takes to.
Would rather ('d rather) also means what you want in a situation. It is followed by the base verb, without to. The other choice comes after than.
The negative is would rather not.