This work presents an optimization-based approach to simultaneously solve the Network Design and the Frequency Setting phases on the context of railway rapid transit networks. The Network Design phase allows expanding existing networks as well as building new ones from scratch, considering infrastructure costs. In the Frequency Setting phase, local and/or express services are established considering transportation resources capacities and operation costs. Integrated approaches to these phases improve the transit planning process. Nevertheless, this integration is challenging both at modeling and computational effort to obtain solutions. In this work, a Lexicographic Goal Programming problem modeling this integration is introduced, together with a solving strategy. A solution to the problem is obtained by first applying a Corridor Generation Algorithm and then a Line Splitting Algorithm to deal with multiple line construction. Two case studies are used for validation, including the Seville and Santiago de Chile rapid transit networks. Detailed solution reports are shown and discussed. Conclusions and future research directions are given.