The person posting as InsideLooking and Pappa Rodger says that X and M were the perp's targets. Not a strong link, but a link.
We know nothing about any ties to BK except perhaps through Mad Greek. Some think through X's sister (who attended Pullman but as an undergrad, I believe). No evidence of it in any released documents.
The 4:00 am delivery has been discussed here many times (go back to around Thread 55 or maybe a bit later or earlier).
The next questions you pose are crucial. If Xana did make the order (which I believe she did and which DoorDash would have a record of and the PCA clearly states that LE has talked to Doordash), she must have made it around 3:15-3:30. Perhaps her activity and moving around on the second floor irritated and deterred her future assailant? BK is driving around, waiting for these girls to settle down, but now, he sees that there was DoorDash (and easily sees that Xana has, at last, headed to her room with her food?)
I believe it's highly likely he assume she'd gone into her room for the night and launched his attack (at around 4:12-13). She is in her room on her phone. Did she hear something or simply want to throw her food bits away? At any rate, it's possible he encountered her - but I think it was *after* he killed Kaylee and Maddie.
We do not know where in the house she received her DoorDash order, IMO. LE believes that BK entered the house through the slider (same floor as D.) He would have been coming downstairs and turning to go into the area where he could leave through the slider. I suppose it's possible he turned in some fashion when she wasn't looking and went down to the door on the first floor which is the "north door."
We don't know which door the DoorDash driver chose. I would think it was the north door, as it's the most easily accessible from an address known as 1122 King. But we don't know.