I don't recognize them so pretty sure it's not from the Well-Tempered Clavier. A cursory search of organ fugues in G major turned up nothing. As these are arrangements for guitar, they could be transposed from other keys. Claude Gagnon, who apparently arranged the Trio, has a website:
Claude Gagnon
Paul Gerrits doesn't seem to though. Looks like he passed away in 2010. The few PDF copies of his arrangements that appear in Google search don't have BWV numbers attached.
Sorry, best I could do