Answer to quantum mechanics problem