# Calculating mix ratio of primaries for given chromacity

I'm trying to calculate the intensities of a Red, Green and Blue, such that they mix into a (white) color. I'm given the wavelengths of the three LED's and their luminous intensity for a given drive current.

I picked D65 as the target white. I figured I first have to calculate the mix ratio of the RGB components. As in the CIE 1931 chromacity diagram you can obtain any color within the triangle of three primaries by a linear combination.

When (as an example) I use the following (CRT phosphor) xy-coordinates: Red(0.67, 0.33), Green(0.21, 0.71), Blue(0.14, 0.08) and D65(0.3128, 0.329). I should get to a mix ratio of 3:6:1.

I setup the following equations: $$\begin{bmatrix} Rx & Gx & Bx \\ Ry & Gy & By \\ 1-Rx-Ry & 1-Gx-Gy & 1-Bx-By \end{bmatrix} * \begin{bmatrix} R \\ G\\ B \end{bmatrix} = \begin{bmatrix} D65x \\ D65y \\ 1-D65x-D65y \end{bmatrix}$$, where I'm interested in the RGB values of the second matrix. Unfortunately, when I solve this system of equations I get RGB(0.289, 0.281, 0.430), which isn't even close to the 3:6:1 ratio.

Did I miss something here?