Also if the two legs of H beam are of different length how will that affect the stiffness expression?
The situation can also be understood as if a fixed-fixed beam is connected to other fixed fixed beam of different length with the help of a connector beam at the center of the two fixed fixed beams.
Figure is attached for reference.