To answer this question you will use the relationship between Denali and Quinn's number of pieces of candy. Create an equation only using d (the number of pieces of candy Denali has).
Quinn's candy - (2d + 4)
Denali's candy - d
So, (2d + 4) + d = 50.
Solve for d.
3d + 4 = 50
3d = 54
d = 18 pieces