The data is a little bit complex,but you can use the knowledge of vector in the subject of algebra,or you can ultimate the basic Euclidean knowledge,like cosine theorem.In detail,you can list two equation with two variable,and get the answer.but i don't finish calculating it.
Multiply first example by 3 and subtract by second example, you will get the following:
3*(5x + 2y) = 3*22 => 3*5x + 3*2y = 66 => 15x + 6y = 66
now subtraction:
(15x + 6y) - (-2x + 6y) = 66 - 3
15x + 6y + 2x - 6y = 63
15x + 2x + 6y - 6y = 63
17x = 63
x = 63/17 ≈ 3.705..... and as it says to round to the nearest tenth our answer would be: x = 3.7
6 boys, ratio is boy:girl 2:3