Oh, you need to use the chunk reordering theorem too, I forgot that was a separate thing in my writeup.
So you move (a chunk of) p to the front of L_{opt}, and then reorder it according the order those transaction have in L (which is allowed as they form a chunk).