While it is true that walking through the garage is like taking the diameter of a circle vs the circumference, I personally don't think it's worth it. I don't think you will save that much time maybe 2 minutes or so.
The AA gates are on pier E, south end of terminal 3 and the AS/QX gates are on pier B. Depending on how fast you walk, it should be less than 10 minutes once you are outside security at G to the entrance to security at B.
http://www.flysfo.com/web/page/atsfo/airport-maps/