Do wifi packets go directly node to node?
Solution 1:
Move it closer to the Base station. Everything you send in typical wifi links goes to/from the base station. Ad-hoc connections are different, but not many use those.
Really, though, I expect your problem has to do with interference. That is much more likely to be the problem than distance. Here's the kicker: that interference may be your own signal.
With wifi, you may have a base station can do a hypothetical 65 Mbit connection. Unfortunately, that is not 65 Mbit for each node: that is 65 Mbit total, shared among not only nodes A and B, but also any other clients on that same channel in the same area. Worse, let's say one of your nodes is only able to get an 18 Mbit signal, and is actively using 3Mbit of that signal. That use scales proportionally to the max theoretical number for the base station. The client is using air time, not bandwidth, and so 3 Mbit of a total available 18 Mbit (one sixth) means it's using one sixth of the total theoretical 65 Mbit supported by the base station, or about 11 Mbit worth of air time. This leaves at most 54 Mbit for all other clients combined on the same channel in the same area. Worse than that, you can even get interference from devices on different channels, because the channel frequency ranges overlap (this is why 2.4Ghz radios should only ever use channels 1, 6, or 11 in the US).
In your situation, when A streams to B, you must upload the data to the base station, which must then resend it to B. That means you cut your available wireless bandwidth in half, because you're having to share. If A is also downloading its data for the stream from the internet you take a share away again, and you're down to one third of the original total. We also need to account for command and control information from the protocols used that must be transmitted. Worse than that, the bandwidth is not shared perfectly. Different nodes can try to send at the same time, resulting in collisions. When that happens, all colliding nodes must re-send the packet. As the traffic increases, the number of collisions increase. As the number of collisions increase, the amount of data needed to be re-transmitted increases, and the odds of additional collisions go even higher. This doesn't even begin to account for other interference sources like cordless phones, video game controllers, microwave ovens, wireless keyboards/mice, running water, etc. In the end, you may only have a small fraction of the original and reported 65 Mbit actually usable. Newer 5Ghz radios can help with this, but it's not a panacea; if you're sharing a base station, you're still sharing a single channel and still sharing your theoretical max among all clients of that base station.
If you really want good performance here, go wired or go home. Wired connections can fix the issues described above in three ways: they can provide a connection that is switched, full-duplex, and that is almost completely insusceptible to outside interference. Switched means that if each node has a 100 Mbit connection to the base, that is 100 Mbit devoted exclusively to that node. If two nodes try to send at the same time, the base is able to hold packets from one and forward them when the line is clear, reducing collisions and therefore reducing the need to re-transmit the same data. Full-duplex means that nodes are able to both send and receive at the same time... again, reducing collisions. Here, node A could be downloading stream data from the internet at the same time that it is sending it back towards B, with no interference or collisions.
In this case, because of all the re-transmission of the same data, you might see dramatic performance improvement if even one of nodes A or B has a wired connection.
A recent example where I'm at is that we deployed iPads to all the faculty this term at the college where I work. To support these devices, during the trial we deployed a few AppleTV devices to classrooms and connected them to the projector to support AirPlay mirroring from an iPad to the front of the classroom. We learned from this that leaving both the AppleTV and the iPad wireless did not work well, especially as we may have two instructors in neighboring rooms both wanting to do mirroring. The solution for us was to install software on the PCs in each room to support AirPlay mirroring to the PC, which is wired. We had to make some network changes so the classroom PCs were on the same subnet as iPads, but the result is much more reliable and with much better video quality.
Solution 2:
With wireless networks in Infrastructure mode (when an AP is involved), all traffic goes through the access point. In ad-hoc mode, traffic goes directly from node-to-node.
That said, it's very possible that moving the nodes closer to the access point will not improve the situation. Wi-Fi operates in the unlicensed portions of the RF spectrum, which is shared by all manner of other wireless devices. As such, this portion of the spectrum can be very noisy at times. This kind of noise will cause lost packets, retransmits, etc.
Just connect the three devices with wired network cables and you'll see performance improve significantly.
Solution 3:
You should (generally speaking) move both nodes closer to the WAP/base station/wireless router they're associated with, because, generally speaking, wireless traffic between nodes goes from the source, to a WAP/base station/wireless router, and then to its destination. (You mention the presence of a base station, so it's probably not the case that traffic is passing directly from one node to another, AKA: "ad-hoc mode.")
That said, distance isn't your only problem, or generally speaking, even the biggest problem. You need to consider absorption (the wireless signal is weakened as some of it gets absorbed passing through objects), reflection (the wireless signal bouncing around off of objects that reflect wireless signals and interfering with itself) and general interference. Since the wireless spectrums are unlicensed, and anyone can use them, "anyone" does use them. So your stream could well be getting interrupted when someone else nearby starts using their wireless network, talking on a wireless phone, or just from whatever other E/M transmissions are flying through the area.
Finally, there are (and always will be) frame collisions - when your WAP/base station/wireless router receives two transmissions at the same time. When this happens, it's resolved by the sender resending the frame, after a delay. And random E/M interference causes collisions, so if you're just in a noisy area for wifi, there may not be much you can do about it.
Really, the best way to improve performance is to use a wire - if both nodes are showing strong signal strength, there's generally not a whole lot you can do about it, unless you're willing to pay a fortune to have your wireless network insulated against outside interference (by installing materials to reflect and absorb external E/M transmissions at the edge of your wireless coverage zones).