Hi Mary,
Both formulas nourish Yin. Of the two, only QYT clears Heat, and it does so from the Stomach meridian in particular. The Stomach meridian appears heavily involved, since it is the main channel serving the masseter muscle region.
The main cause of Heat trapped in the Stomach is Shao Yang disharmony. In some very early cases, just using a Shao Yang harmonizer like XCHT can reverse MMM pathology. Although a Blood Heat formula, QYT also works well in Shao Yang disharmony cases to subdue severe inflammatory responses. Likely some of that action is because of the Stomach Heat Clearing herbs like Huang Lian that it contains.
QYT doesn't just clear (i.e., drain) Heat. It also expels Heat pathogens. In rare cases, I've caught MMM in the Wind invasion (i.e., initial) stage, and QYT has worked handily to stop the problem from progressing.
Lastly, for chronic inflammation in particular, there is a Blood stasis component that YGJ does not address. QYT has strong Blood moving properties.
For those reasons, I think of QYT first in active MMM inflammation. If the damage is done and muscles are severely contracted, I've found Bu Gan Tang can help restore muscular suppleness.
Hopefully, this helps you out in distinguishing the two!
Steve