That seems logical.
In the question it is asked to calculate the mass ratio of the two compounds, but in the answer, percents were shown: 0.111 % of NaF and 0.379 % of Na
2PO
3F. I guess that these are mass percents and they correspond to the values I got now using your way. Still, I think that this part needs to be changed:
The total amount of fluorine...consists of 0,050 % (of mass) of each compound.
This would mean that 1g of fluorine consists of 0.0005g of fluorine from NaF and 0.0005g of fluorine from Na
2PO
3F. While it is irrational, it could be easily read that way (I don't see why it couldn't). If they gave 50% instead of 0.050% it would be much easier to understand, so now I think that they mistaken. Didn't they?