Zip tie a basket to your rack. Put the backpack in the basket. Optional: Use a cargo net to keep everything in place.
That's what I do - it's quick and easy. Putting a backpack in a pannier doesn't make a lot of sense to me - plus, depending on where you park, you have both a backpack and a pannier to carry.