With ratio questions we first have to look at the ratio split that the question wants. In this case is is 2:1, first sum up the two numbers that make the ratio, 2 and 1, to get 3. Then divide the number that needs splitting into a ratio by the sum, so this leaves us with 24/3 which is 8. The final step is to multiply the latest number 8, by the ratio splits.
So 8 * 2 gives us 16 so Dave will get 16. Whilst 8 * 1 is 8. A quick check to make sure your answer is right is to add up these numbers and it should total the original amount. As 8 + 16 is 24 this gives us an idea that our answer is correct. It definitely is in this case!