Indonesian splits goodbye according to who is going and who is staying. English does not, so this one has to be learned rather than guessed.
Selamat jalan is said to the person leaving. Jalan means to go, so you are wishing them a safe journey.
Selamat tinggal is said by the person leaving to those staying. Tinggal means to stay.
Why the mistake matters
Selamat tinggal carries weight. It is the goodbye of departures with no return date, of leaving the country, of the end of something. Say it as you walk out of a shop and you have announced you are leaving for good.
The cost of getting it backwards is not confusion but comedy, and the person will remember it.
The way out
Almost nobody uses either in daily life. Use sampai jumpa ‘see you’, which works in both directions and cannot be got wrong.
Sampai jumpa besok ‘see you tomorrow’
Sampai nanti ‘see you later’
What you’ll actually hear
What the book says: Selamat jalan. What you’ll hear: Dadah! or, borrowed straight from English, bye!
Dadah is what you say to children and friends, with a small wave. It is everywhere.