Yes, hiring a seasoned expert to help you with a difficult assignment is completely legitimate. The only restriction here is that if the assignment is fully done by another person, you shouldn’t submit it as your own without implementing any changes. Otherwise, this might be considered a violation of academic integrity principles.