I think MOST boys quit playing with them by the time they are around 7. But all boys are different. I remember when I took my son to the Holiday Junction at the museum (it's an annual train thing they do with lots of model trains set up all over) and he was mesmerized by the trains. I was talking to one of the owners of the model trains, and said how much my son LOVED trains. And he said, "It won't last. All three year olds love trains. He'll outgrow it." (At the time, I was thinking, well, you apparently didn't!)
Flash forward 9 years. My 12 yo son still loves trains, still is in awe when we see a real one, still watches, mesmerized, at how they work, and still will play sometimes with his wooden Brio trains. He doesn't play with them that often, and mostly when other kids want to play with them, but he still does.
So - I think, since your son is only three, you should invest in it.
If you break it down, even if he stops playing with them in only TWO years, that gives him 24 months of playing with them. Which is $3.33 per month, which is just over a dime a day. A dime a day is pretty cheap for keeping your child entertained and allowing him to use and expand his imagination and creativity. Not to mention the various ways he can put together the tracks....VERY good for his cognitive skills!
Blessings.