???
Some rather general ideas:
Unless P had an amount which is sure the smaller one, because half of it can't be paid in notes ( e.g. 7 $ ), there's no advantage of swapping for him ?
If P has 1000, Q either has 500 or 2000, and the same rule applies to Q.
If swapping is good for P, it should be good for Q as well, so both should request to swap or both should keep what they got.
Now, there are some questions of unterstanding:
I understand, if P requests to swap, Q receives the other envelope.
If Q has the bigger one after the swap, he keeps it, P has lost and the story is over.
If Q has the smaller one after the swap, he can easily ask to swap back the next minute, and it will never end, and no one can ever spend the money ?
If no one requests a swap at 12:00, do they have to wait forever as well?
Does it end if at any minute no one requests a swap?
Or is there anyway max. one swap, which finishes the riddle ?
They could both request a swap right at the start, then one of them sure loses?
The only "real" solution is they agree not to swap and go home immediately.
The thought remaining for me: should P and Q agree to take their envelope as is, or to share to get the same amount? With the latter case, both have a 50:50 chance to lose 25% or win 50% of what they got anyway.
But that seems something different, so I probably did not get your riddle correct?