Let the components of the line segment (vector) be $(x,y,z)$
Given the length of the vector =21.
$\Rightarrow\:x^2+y^2+z^2=21^2=441$..........(i)
Also given that $d.r.$ of the line segment is $(2,-3,6)$.
$\Rightarrow\:\large\frac{x}{2}=\frac{y}{-3}=\frac{z}{6}=\lambda$........(ii)
From (i) and (ii) we get $ 4\lambda^2+9\lambda^2+36\lambda^2=441$
$\Rightarrow\:\lambda^2=9$
But since the line makes obtuse angle with $x\:axis$ $\Rightarrow\:x$ is -ve.
$\therefore$ $\lambda=-3$ and the components are $(-6,9,-18)$