Probability means number of [successes (study French)]/[Total number (of boys or of girls)].
3/7 of 644 boys study French=3×644/7=3×92=276.
5/8 of 520 girls study French=5×520/8=5×65=325.
Total number of students who study French=276+325=601.
Total number of students=644+520=1164.
644-276=368 boys and 520-325=195 girls don’t study French.
Total of non-French=368+195=563.
Probability that random student doesn’t study French is 563/1164.