let z be the required vector. z=±(x×y)/l(x×y)l, So there are two vectors. Consider their dot products with k, one of them will be positive and the other will be negative. The one that is negative makes an obtuse angle with the z-axis. This vector is the answer.