It turns out the math was right, it's just I had a dumbass issue in order of checking things. Yay for my stupidity. :P
Also I changed it from a ray to a line segment with the target of the test for the other source. Really its the same in code, only with a defined end so it would not record a collision if there is a wall behind the target etc.
Isn't the direction of a ray just the ray itself? I'm interested in what you are doing because unlike my differential equations professor my linear algebra professor was useless so I've never seen any application of the math to a task.
The direction is one thing, but when checking for it's collision against a half plane the origin of the ray is also needed.