We report the discovery of two planetary systems, namely G 264-012, an M4.0 dwarf with two terrestrial planets ($M_{rm b}sin{i} = 2.50^{+0.29}_{-0.30}$ M$_{oplus}$ and $M_{rm c}sin{i} = 3.75^{+0.48}_{-0.47}$ M$_{oplus}$), and Gl 393, a bright M2.0 dwarf with one terrestrial planet ($M_{rm b}sin{i} = 1.71 pm 0.24$ M$_{oplus}$). Although both stars were proposed to belong to young stellar kinematic groups, we estimate their ages to be older than about 700 Ma. The two planets around G 264-012 were discovered using only radial-velocity (RV) data from the CARMENES exoplanet survey, with estimated orbital periods of $2.30$ d and $8.05$ d, respectively. Photometric monitoring and analysis of activity indicators reveal a third signal present in the RV measurements, at about 100 d, caused by stellar rotation. The planet Gl 393 b was discovered in the RV data from the HARPS, CARMENES, and HIRES instruments. Its identification was only possible after modelling, with a Gaussian process (GP), the variability produced by the magnetic activity of the star. For the earliest observations, this variability produced a forest of peaks in the periodogram of the RVs at around the 34 d rotation period determined from {em Kepler} data, which disappeared in the latest epochs. After correcting for them with this GP model, a significant signal showed at a period of $7.03$ d. No significant signals in any of our spectral activity indicators or contemporaneous photometry were found at any of the planetary periods. Given the orbital and stellar properties, the equilibrium temperatures of the three planets are all higher than that for Earth. Current planet formation theories suggest that these two systems represent a common type of architecture. This is consistent with formation following the core accretion paradigm.