see the total length of the rod ie. fwom one wall to the other remains constant
now each rod will have two forces acting on it
Tensile force and the other due to the heating effect
each rod shall expand by:-
(a1l1T) - ((Fl1)/AY1))
where everything has its usual meaning
F is the thermal stress developed and A is cross section area
=> Total extension is:-
(a1l1T) - ((Fl1)/AY1)) + (a2l2T) - ((Fl2)/AY2)
now the displace of he joint is given by :-
delta l = l1 + ((a1l1T) - ((Fl1)/AY1)) [ put the value of F here]!!
here you are
(((l1l2(Y2a2 - Y1a1)T))) /((Y2l1 + Y1l2))