but how does it get to/from WAW again
As LO900x, but unless needed, one 787-8 is semi-permanently assigned to BUD.
However, since there are fleet shortages, this is not always the case now, some wetleased A330s and 767 may appear in BUD operating for LOT.
Does the crew deadhead back to WAW
Crews are Hungarian, or at least are supposed to be. If not, there are multiple BUD-WAW and BUD-KRK flights to get the Polish crews back home, if needed.