I'm not entirely sure if this is correct, but if it's not, it's at least a step in the right direction.
First, you shouldn't need the red marble's final velocity because you need conserve energy in both the x and y dimensions, which will allow you to set up a system of equations. This system will have 2 unknowns, so you can just express the red marble's velocity in terms of the purple's.
First, you want to set it up so that the energy equation in the x direction is as follows (P.S. I factored out, and divided the 1/2*m factor because it is a like factor)
Doing the same for the y dimension, we get the following
Using the latter, we can express in terms of by solving for
You should get
When we replace the with the solution we just got, we get the equation