Mechanical or Petro

Would it be better to study petroleum engineering at Texas A&M or University of Texas or to study mechanical engineering at Berkeley or Stanford?

You only have those options? No mechanical engineering at the Texas schools?

Ultimately that’s not important. The important question is what sort of career you think you want.

I am slightly more interested in petroleum, but if given the chance to go to Berkeley or Stanford, it might be a better option to just study mechanical

That would depend on things like cost and fit, because the differences are likely a lot less than you think in terms of academics (at least in engineering).