So in the narrow stud cavity with the insulation, that horizontal pipe goes to a quarter bend, rather than to a san-tee connected to a vent through the roof?
In that case, your rough-in was intended to utilize an AAV under the lavatory. That would vent the lavatory, which could then wet vent the WC and the shower. The piping configuration shown in the first picture looks correct for that strategy, assuming that the total fall from the shower trap to the wye just upstream of the backwater valve is at most one trap diameter.
If you are going to be breaking open the concrete and reconfiguring the underslab pipes to put in a tub instead of a shower, you'll need to maintain that fall limit and the correct connectivity order. [Starting at the lav, the lav drain joins just the WC (or shower) and then the shower (or WC); i.e. with wet venting and the lav providing the vent, the WC and shower can't join before either one joins the lav.] In particular, if your fall from tub trap to that wye is between 1-1/2" and 2", which it would have to be if the trap arm length is between 6' and 8', you will need to use a 2" tub trap; the tub waste and overflow can be 1-1/2" and you can transition size at the trap inlet.
Cheers, Wayne