Tandem planet formation for solar system-like planetary systems