It depends on what you mean.
If you're asking whether both games can live on the same computer, absolutely. They're completely separate titles, so there's no conflict in having The Sims 3 and The Sims 4 installed on your laptop or PC at the same time.
But if you're hoping that installing The Sims 4 automatically lets you play The Sims 3, then no. You'd need to buy and install The Sims 3 separately.