If any rollover is taxed it would be the second one. The disallowed rollover would be treated as a new contribution, and would become part of the non-taxable basis in any future withdrawal.
But hold on, I'm not so sure the second rollover is disallowed. For one thing, what is Vanguard telling you about the situation? If both rollovers were made to Vanguard using a trustee-to-trustee transfer, their systems should have flagged the second rollover since it was made for the same beneficiary. Is Vanguard treating it as a disallowed rollover? Of course, if you did not use a trustee-to-trustee transfer, but rather a 60-day transfer, it would be a little more difficult for their systems to flag it.
Also, there seems to be some uncertainty about whether a second rollover is disallowed when it involves different funds than the first rollover. A similar 12-month restriction exists with IRA rollovers and for many years the IRS said that you could make multiple rollovers within a 12-month window as long as the rollovers were coming from separate IRA accounts. The Tax Court ultimately ruled the IRS was wrong and that all IRAs had to be treated as one account. Query: Does the 529 rollover restriction follow the Tax Court stance or the prior IRA stance? This is something you may want to discuss with a tax professional as it relates to your own situation.
Here is more on the IRA situation: https://www.irs.gov/retirement-plans/ira-one-rollover-per-year-rule