A couple of points here, while Buddhism and Taoism both came up around the same time there aren't a lot of records dating back to the 4th century BC so it's debatable which came first. Also Gautama was Hindu and would have been more influenced by that culture.