It is impossible for one fish to breed with another when in two separate tanks. However, if the fish are egg scatterers, then it may be possible. Not all tank dividers, even glass ones have a water tight seal so if the female lays her eggs, the male's sperm has a chance of fertilizing them. This is ONLY if the fish are in the same tank, but with a divider.
That is totally by a long shot in all the right conditions. If you still mean in two separate tanks, then it's impossible.