Welcome!
I’m glad that you didn’t decide to get rid of the rabbit after your daughter lost interest. Many people in your situation opt to dump the bun somewhere, so thank you for keeping her and trying to improve her life.
5 months old makes her a teenager, so her hormones are most likely starting to run wild. Litter training won’t really be possible until you have her spayed. That should cut down on territorial marking and other undesirable behaviors. Once that’s done and she has more appropriate housing, you can start litter training her by first keeping her contained to a small area. Once she gets the hang of her litter box you can gradually increase the amount of space available to her. That way she will slowly learn to go back to her litter box as she gets more space over time. Put stray poops in the box, if she pees, use a papertowel to soak it up and put that in the litter box as well to show her where it’s supposed to go.
Also, rabbits love to go while they eat, so placing her hay and food into the box will encourage her to use it more.