It's the other way round. Think of it this way.

D is bigger than Q. You need to multiply Q by 2 to get the equal amount of D.

So,

D = 2Q

Similarly,

N = 3Q

And

Q + N + D = 54

From there, put everything in Q.

Q + 3Q + 2Q = 54

Solve for Q. The rest will come easily.

Think in terms of "what should I do to X to make it equal to Y?"

It helped me a lot, maybe it can hel you too!