First, you multiply the number by 2, to find how many you had before you ate 1/2 of the candies.
6*2=12
Next, you would divide the number you just got, in this case it would be 12, by 3, because there is 3/4 of the original candy left
12/3=4
This means 1/4 of the original candies was 4, so you add 4 to 12 to find the final answer.
4+12=16
You had 16 candies in the beginning.
Let me know if this doesn't make sense.