There are three steps to this problem.
1. First, you'll need to find out what 1/4 of 40 is. An easy way to determine this is by simply dividing 40 by 1/4. (This will only work if you have to divide a fraction with a numerator of 1 by a whole number, though.) You'll end up with 10.
2. Then, you will have to determine what 4/5 of 10 is. You can't divide a number by a fraction, so you will have to multiply 10 by 4/5 instead. The picture shown is how you'll set it up.
3. Now you'll need to simply 40/5, to do this, you can simply divide 40 by 5.
Your answer will end up being 8.