There are, I think, two different issues you may be asking about here:
One is how can they communicate using light, etc, if they are both moving away from each other at near the speed of light. One of the features of special relativity is that the speed of an object depends on the reference frame, so even if ship A is travelling at, say, 0.9 times the speed of light away from point X, and ship B is travelling in the other direction away from X at 0.9 times the speed of light, from ship A's perspective, ship B is moving away from it at only 0.9945 times the speed of light (not, as one might expect, 1.8 times).
Therefore, a light beam travelling from one to the other of the ships will still travel faster than they are moving away from each other (barely), so it is still possible to send signals from one to the other that way. It will just happen a lot slower than if they were not moving away from each other so fast (and the round-trip time will obviously get longer and longer over time).
The other issue you bring up is basically the "Twin Paradox" (which you may want to look up in more detail). The issue is that from A's perspective, B's time should be moving slower than A, but from B's perspective, A's time should be moving slower than B. There is actually no paradox here, though. All A knows about B's state is what they receive from B's light communications, and vice-versa, so really what this means is that the communications that A receives from B will "look" like B's time is slowed down, but conversely the communications that B receives from A will also "look" like A's time is slowed down. This actually makes sense if you think about the fact that they're moving away from each other very fast, so the light that is travelling from one to the other will be taking a longer and longer time to get there, which will actually present the appearance of the sender being slowed down relative to the receiver (no matter who is the sender or receiver). Both will see what they expect to see, it just won't actually agree with what the other one sees (but that's ok, because it doesn't actually affect anything if the people on A and B have different opinions about what appears to be going on with time).
The Wikipedia article on the Twin Paradox actually covers some of this as well:
https://en.wikipedia.org/wiki/Twin_paradox#What_it_looks_like:_the_relativistic_Doppler_shift
There are some other practical issues which would need to be accounted for too, of course, such as plain old Doppler shift. If the ships are moving that fast away from each other, then all light/radio/etc emissions received from the other will appear to have their frequency shifted dramatically downwards, so the transmitting ship will need to send signals at very high frequencies, and the receiving ship will need to receive very low frequencies. Depending on how fast the ships are travelling, this could actually be so great that it's effectively impossible to find a combination of high-frequency and low-frequency which the ships are actually able to both send and receive (for example, even if they send gamma rays they arrive at the other ship as sub-ultra-low-band radio waves instead).