There is a useful trick here. You could set $$\vec x = (x_1, x_2, x_3)$$ and $$\vec k = (k\cos \phi\cos \theta, k\cos\phi\sin\theta, k\sin\phi),$$ but then you end up with some nasty integrals on $\theta$ and $\phi$ to work out. But since $\vec x$ is constant for the purposes of this integral and the integration is over all space, we can choose a coordinate system with $x$ as the vertical axis ($\phi = \pi/2$). Then $x = (0, 0, x)$ and $$\vec x \cdot \vec k = kx\sin\phi$$