The amount of proven and confidently expected recoverable oil continues to rise as new extraction technology is developed, so we have no sound idea how long it may last. The first serious projections it would run out had us hitting the wall forty years ago. Didn't happen.
In the US alone there probably are at least three hundred years of coal. That total, too, is subject to revision upward.
Published numbers on this topic are unreliable, though. Not only are they continually changing as new reserves and means of getting them are found, they are shamelessly massaged by political activists with hidden agendae. Take everything you hear about energy resources with a lot of skepticism. The bottom line is that we're not about to deplete them any time soon. Beyond that we don't know.