The formation of two stellar bars within a galaxy has proved challenging for numerical studies. It is yet not clear whether the inner bar is born via a star formation process promoted by gas inflow along the outer bar, or whether it is dynamically assembled from instabilities in a small-scale stellar disc. Observational constraints to these scenarios are scarce. We present a thorough study of the stellar content of two double-barred galaxies observed by the MUSE TIMER project, NGC 1291 and NGC 5850, combined with a two-dimensional multi-component photometric decomposition performed on the 3.6{mu}m images from S4G. Our analysis confirms the presence of {sigma}-hollows appearing in the stellar velocity dispersion distribution at the ends of the inner bars. Both galaxies host inner discs matching in size with the inner bars, suggestive of a dynamical formation for the inner bars from small-scale discs. The analysis of the star formation histories for the structural components shaping the galaxies provides constraints on the epoch of dynamical assembly of the inner bars, which took place >6.5 Gyr ago for NGC 1291 and >4.5 Gyr ago for NGC 5850. This implies that inner bars are long-lived structures.