Well, I can't tell for sure what the bugs are, but the 'white poo' is urates. Completely normal.. it's sort of a solid form of urine. It is chalk like when dry and usually white or yellow.

I second the suggestion of getting a fecal test done at the vet (a reptile vet) and I'd suggest taking the snake to the vet for a check up too. How does your friend keep the snake?