"Sorry to have kept you waiting" vs. "sorry for having kept you waiting"
Solution 1:
I am sorry to have kept you waiting so long. It is fine but can be a bit better:
I am sorry to have kept you waiting for so long.
I am sorry for having kept you waiting so long. It is fine but can be a bit better:
I am sorry for having kept you waiting for so long.
I'm sorry having kept you waiting so long. Not so good. Better:
I'm sorry for having kept you waiting for so long.