Sorry about the pictures being so big and before the text.
We are trying to do rough plumbing for a bathroom in the first pic, and a laundry room in the second pic. There was an existing bathroom with a home made cement shower pan that sat on top of the slab and a sink on the outside of it that drained into D on the pic. There was a toilet at B. We cut a hole at A and saw that the main waste pipe (purple) was likely too high to put a shower drain right there (which is what we wanted). My husband did some cutting for what we hoped would be a toilet, sink and new floor drain (a wall will be moved) and he ran into the continuation of a secondary drain pipe (yellow) by C.
The pic of the future laundry room has a vertical pipe (yellow), which was connected to their kitchen sink on the floor above. That pipe goes 'uphill' and I'm sure drained very poorly as there was a ton of water damage where the kitchen sink was. The last pic shows an over view, the dashed lines are guesses.
Can we just cap off the secondary (yellow) pipes at D and E?
How much vertical room would we need at A to make a shower drain with a p trap?