We investigate the thermoelastic response of a nanolayered sample composed of a metallic SrRuO3 (SRO) electrode sandwiched between a ferroelectric Pb(Zr0.2Ti0.8)O3 (PZT) film with negative thermal expansion and a SrTiO3 substrate. SRO is rapidly heated by fs-laser pulses with 208 kHz repetition rate. Diffraction of x-ray pulses derived from a synchrotron measures the transient out-of-plane lattice constant c of all three materials simultaneously from 120 ps to 5 mus with a relative accuracy up to Delta c/c = 10^-6. The in-plane propagation of sound is essential for understanding the delayed out of plane expansion.