The question is
Three vertices of a parallelogram ABCD are A(3,-1,2), B(1,2,-4) and C(-1,1,2). Find the coordinate of the fourth vertex.
To get the answer I tried the distance formula, equated AB=CD and AC=BD.
On
If you have a parallelogram ABCD, then you know the vectors $\vec{AB}$ and $\vec{DC}$ need to be equal as they are parallel and have the same length. Since we know that $\vec{AB}=(-2,\,3,-6)$ you can easily calculate $D$ since you (now) know $C$ and $\vec{CD}(=-\vec{AB})$. We get for $\vec{0D}=\vec{0C}+\vec{CD}=(-1,\,1,\,2)+(\,2,-3,\,6)=(\,1,-2,\,8)$ and hence $D(\,1,-2,\,8)$.
You don't need to consider distance. You need to compute the difference vectors between adjacent sides. For instance, compute the difference vector from $B$ to $A$ and then add that to $C$.