Unfortunately, the train does not go to Smithtown from Babylon, but close by is the Deer Park train station (Ronkonkoma line). Take the train from Deer Park to Hicksville and switch to a Port Jefferson train heading east. Look at a Pt Jeff schedule for price and times. Smithtown is on that line to Port Jefferson As an alternative, you can also take the train to Bethpage from Babylon as they have a cross line between the two stations, but those trains do not run often, so the first option from Deer Park is better.
Do.a search in Google maps, enter your destination, and it will show you how to get there. You can also change the time you want to leave or arrive.
Thanks! Your answer is awaiting moderation.