Answer :

Use the equations:
17 = D + N+ Q
D=N/3
Q=N+3
Then Substitute D and Q
17 = (N/3)+N+N+3
Solve for N; N=6; then substitute N for D=N/3 and Q=N+3
The answer is
Q=9
D=2
N=6