Lucas gave you some links to help with detailed planning of schedules and routing.
The timetable, which I linked you to, and which would be included in his links, is the tool to answer those kinds of questions
Perhaps you have not worked with it yet?
Here is a link to the schedule from Luzern to Stein on May 25th, on or after 1800 hours:
www.sbb.ch/en/buying/p ages/fahrplan/fahrplan .xhtml?suche=true&ab=true&lan guage=en&vias=%5B%22%2 2%5D&webshopPreviewMod e=inactive&von=Luzern& nach=Stein+am+Rhein&vi aField1=&datum=Thu%2C+ 25.05.2017&zeit=08%3A0 0
The timetable offers two trains per hour. The journey takes about 2 hours and 15 minutes. In the timetable there is a note "Direction Zuerich main station" or "Direction Zuerich Flughafen." those indicate the direction, not necessarily where you change trains. Every other train (the ones at xx10) continues to the airport after stopping at ZHB ( Zuerich main station), so that, if you want to go to the airport from Luzern, you can use those trains to get there without a change at Zuerich HB (main station)
Click on each route to see the details of where and when you must change trains. The connection time is given at each station.
The instructions in the first page of the link that I gave you explain how to use it:
Specifically, in the instructions, it notes that the timetable defaults to the fastest route.
The fastest route to Stein from south of Zuerich is always through Zuerich main station (Hbf) and thence through Schaffhausen.
This map is good to help you with the geography and the routes if you zoom in:
If you want to force the routing through another station, use the "add via" option where you first enter the names of your starting point and your destination.
As Lucas says, you can do both the Rigi and Pilatus in one day.
Remember, at the end of the day, you have a 2 and 1/4 hour ride from Luzern to Stein.
Including the Rigi -
If you choose to make Rigi Kulm your last target, you can choose to take the cograil train down to Arth-Goldau and connect to the main line to Zuerich main station. That is the fastest route. The last reasonable connection at 1804 takes 3 hours and 21 minutes from the top of Rigi. It gets you to Stein at 2125 if you do not miss the 14 minute connection because you stop to pick up luggage.
If you leave your luggage in the easily accessible lockers at Zueri HB ( require Swiss coins; there is a change making machine which often works) and you know what you are doing, you can easily get your luggage and make a 14 minute connection. If not, you wait for the next train(s)
I have not run a full set of schedules and connections. I do not know what time you arrive at the airport. I do not know if you are coming from a Schengen country ( allows skipping passport control and saves a few minutes).
If you are coming from, for example, the USA, you will likely be contending with the effects of jet lag, meaning that there is a good chance of missing at least one connection on a complex itinerary.
The main line trains are fast and frequent. The local trains stop at many stations ( click on the plus sign in the individual route plan in the timetable which will show intermediate stops.) Excursion trains such as cograils are SLOW.
My advice is to work the timetable very carefully. I would do it one step at a time and write down the whole journey one step at a time, although it is possible to lay out the whole journey in one shot. That stepwise approach saves confusion and allow you to see the next train if you miss one, etc.
Allow time for getting from the plane through the airport to the train. The train station is 2 minutes from the point where you exit the Arrivals Hall. Allow time for meals...available at most stops along the route. Allow time for leaving your luggage. Lockers are most convenient at Zueri HB, but, if they are full and you have to go to the "left luggage" office which adds about 10 minutes total,or you have to get change, it might affect the connection.
The lockers at Luzern HB are way out beside track #1. There are not a lot of them. However, because they are inconvenient, they usually are not full....except on holiday weekends.....and, you have to consider whether you will return through Luzern. You pretty much have to return through Zuerich HB.
Some people allow time for sightseeing at a destination......you won't have a lot, but the journeys themselves are scenic.
When you get done, I suspect you will find that doing Pilatus and the
Rigi in one day is possible, but will require precision planning,and precision in making connections.
Personally, if I were doing it, I'd stop at the tourist info office by track #1 in Luzern HB and ask about the weather up top. Pilatus is higher than the Rigi,so that can make a difference. If the weather is good, I'd take the boat to or from Alpnachstad as part of my journey, go only to Pilatus (weather permitting) or the Rigi (2nd choice.) If I chose the Rigi, I'd take the boat (once per hour) from Luzern to Vitznau, then the cograil up to Rigi Kulm. I'd come down on the other train, to Arth-Goldau for the train directly back to Zuerich HB
Luzern itself is a good alternative if the clouds are thick on top of both the mountains.
These three links deserve your attention:
Those are my personal opinions. Its up to you if you want to fit both the Rigi and Pilatus in one day, but it will require careful planning. I would not do it, but plenty of people have done it easily ....from a base in Luzern. You have 2 or 3 hours "extra" in your day because you start at the airport and finish at Stein.That would likely make for a very rushed day.
And, remember, that you want to spend at least a few minutes walking around Stein. I like to eat in the castle, on a clear day. Climbing up to it gives you an appetite.