If you want to travel from Sungai Petani to Hatyai in Thailand, the easiest way to get there is to take a KTM train via Padang Besar, then another SRT train to Hat Yai Junction Railway Station or you could take a minivan or local bus from the Thai side of the border to the Bus Terminal in Hat Yai.
The distance from Sungai Petani to Hat Yai is around 160 km by road.
There is no direct train service to Hat Yai Junction Railway Station from Sungai Petani Railway Station so you will first have to take either an ETS train or KTM Komuter Utara (commuter) train to the border station of Padang Besar.
By far the cheapest option is to take one of the regular KTM Komuter trains.
For the latest Komuter train timetable to Padang Besar from SP, see the following link:
The other, more expensive option is to take an Electric Train Service (ETS) from SP to Padang Besar.
The only advantage of taking an ETS train is that you have a reserved seat (unlike the commuter trains).
If possible, you want to arrive at Padang Besar station around 30 - 60 minutes before the Shuttle Train to Hat Yai Junction departs (enough time to buy your tickets and go through immigration / passport control).
If your plans don't fit in with the Shuttle train, there are other ways to get from the border at Padang Besar to Hat Yai.
First, you will have to take the footbridge over the tracks to the main road border crossing.
Once inside Thailand, you can then take a minivan or local bus to Hat Yai Bus Terminal.
The cost of travelling from Sungai Petani to Hatyai using a KTM Komuter train, then the Shuttle or minivan is around 15 to 16 RM.
Although you can travel by bus to Hat Yai from Sungai Petani, there are no direct services so it will take you a long time.
To travel by bus, you will first have to get from SP to Alor Setar Bus Terminal.
From there you can then either:
Take a bus to Bukit Kayu Hitam (via Changlun) and cross over into Thailand via the Dannok / Sadao border, then take a minibus into Hat Yai.
Take a bus from Alor Setar to Kangar, then take a bus to the border at Padang Besar, then take a train, bus or minivan from there to Hat Yai.
It is a lot of hassle to travel by bus from Sungai Petani to Hatyai and will end up taking a long time and costing more - so stick to the train.