This problem is one that is often covered in rudimentary staitics of mechanics indeterminant structures.
What you have is that the compressive displacement is equal, as is the force, in both parts. You must solve the 2 equations together to obtain an answer. The big trick is that the threaded rod has an initial displacement due to the heating.
So, the final displacement of the rod is
dL_rod = alpha*dT - delta_compression_cylinder
Hope this has helped,
jetmaker