That's a complex configuration and I don't have an overview about the possible interactions. But here are some information that may help you. I assume you are using a Raspberry Pi 3B or 3B+.
First of all you can see what combinations of connections are possible with the on-board WiFi device. Show it with:
rpi ~$ iw phy
Just at the end of the output you will find a section valid interface combinations:
that looks like this:
valid interface combinations:
* #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
total <= 3, #channels <= 2
* #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
total <= 4, #channels <= 1
This means that you can use together one client connection (managed), one P2P-device (WiFi-direct), one P2P client or group owner (also WiFi-direct), in total three connections at the same time.
Or you can use together one client connection (managed), one access point (AP), one P2P-client (WiFi-direct), one P2P-device (also WiFi-direct), in total four connections at the same time.
How to use an access point together with a client connection you can look at Access point as WiFi repeater, optional with bridge.
How to use a P2P-client connection you can find at Setting up Wifi direct (wifi p2p) and DHCP server.
Some information about setting up a P2P group owner you will find at p2p_group_add setting own password and ssid.
You may also consider to use an USB/wifi dongle with its additional possibilities of connections (check with iw phy). At least then you can have two client connections at the same time.
It's now up to you to combine this to your needs.