Yes, it is correct to say happy birthday both of you when two people have their birthday together. It is a way to show that you are equally happy for both people and that you wish them both the best on their special day.