1. I wish you paid more attention in class (you/understand everything).
If you paid more attention in class, you would understand everything.
2. I wish they had called before they came (I/cook something).
If they had called before they came I would have cooked something.