Step 1: Idea:
Perpendicular vectors have zero dot product. I will multiply matching components, add the three products, and put the sum equal to zero.
Step 2: Form the equation:
Pair the $\hat{i}$ parts, the $\hat{j}$ parts and the $\hat{k}$ parts:
$x \times (-x) = -x^2$, $(-3) \times x = -3x$ and $5 \times 2 = 10$.
Adding them gives
\[ -x^2 - 3x + 10 = 0 \quad \Longrightarrow \quad x^2 + 3x - 10 = 0 \]
Step 3: Use the quadratic formula:
Here $a = 1$, $b = 3$, $c = -10$. The discriminant is $b^2 - 4ac = 9 + 40 = 49$, which is a perfect square, so the roots are rational.
\[ x = \frac{-3 \pm \sqrt{49}}{2} = \frac{-3 \pm 7}{2} \]
Taking the plus sign: $x = \frac{4}{2} = 2$. Taking the minus sign: $x = \frac{-10}{2} = -5$.
Step 4: Quick substitution test:
Put $x = 2$ in $-x^2 - 3x + 10$: $-4 - 6 + 10 = 0$.
Put $x = -5$: $-25 + 15 + 10 = 0$.
Both roots satisfy the equation, so no value is rejected.
Final Answer:
The vectors are perpendicular when $x = 2$ or $x = -5$.
\[ \boxed{x = 2 \text{ or } x = -5} \]