"I am sorry to have caused you so much trouble" is correct and formal.
"I am sorry to have given you so much hassle" is also correct but less formal. Hassle is almost a colloquialism, in my opinion. Because of their differing degrees of formality, I would not use both trouble and hassle in the same sentence.
- For Teachers