P1
P2
P3
Main cake:
P1 cuts the cake into three pieces they consider of equal size
P2 trims their favourite piece, making it equal to their second
P3 chooses their favourite piece that isn't the trimming
P2 chooses next but has to take the trimmed piece if P3 didn't
P1 takes the remaining piece just leaving the trimming
Trimming:
We call P1 & P2 PA & PB where PA took the trimmed piece
PB cuts the trimming into three piece that they value equally
First, PA chooses their favourite piece of the trimming
Then, P1 chooses their favourite of the remaining pieces
Finally, PB gets the last remaining piece of the trimming
Then we can combine the trim assignments to the main ones