Hi,
The problem is in the order you wrote your code that instead of creating a STA and a AP, it created two AP devices.
NqosWifiMacHelper wifiMacHelper = NqosWifiMacHelper::Default ();
Ssid ssid = Ssid ("ns-3-ssid");
wifiMacHelper.SetType ("ns3::StaWifiMac", "Ssid", SsidValue (ssid), "ActiveProbing", BooleanValue (false));
WifiHelper wifiHelper = WifiHelper::Default ();
wifiMacHelper.SetType ("ns3::ApWifiMac", "Ssid", SsidValue (ssid));
NetDeviceContainer apContainer = wifiHelper.Install(wifiPhyHelper, wifiMacHelper, ap);
NetDeviceContainer wifiContainer = wifiHelper.Install(wifiPhyHelper, wifiMacHelper, stas);
This is your code. You have created the wifiMacHelper and set its type to STA .
Then instead of installing it to the STA devices, you reconfigure its type to AP and install it to both AP and STA nodes.
The fact that you have named a node STA, does not make it STA...
I will leave the solution to you.