Yes, it might be true to some extent that the United States did fund the radical Islamists in Afghanistan which later turned into Alqaeda and Taliban. This happened during the soviety war and these rebels were provided resources and weapons to fight back with the Russians.
However, they soon took power into their own hands and after having gathered enough power, declared war against the United States in the name of their own land and religion. The history of the rise of Alqaeda and Taliban is quite complex and dates back to decades ago, before which these organizations did not exist.