I wont guess the final career tallies as I would need to see Federer and Nadal play into much older age to access them vs an older Agassi who won 5 of his 8 slams at age 29 or older.
However if they all were born in the same year and were currently ending a year in which each turned 28 mid year my guess would be:
Federer- 3 Australian Opens, 1 French Open, 2 Wimbledons, 4 U.S Opens
Agassi- 1 Australian Open, 0 French Opens, 0 Wimbledons, 0 U.S Opens
Nadal- 1 Australian Open, 7 French Opens, 1 Wimbledon, 1 U.S Open
Sampras- 2 Australian Opens, 0 French Opens, 4 Wimbledons, 4 U.S Opens.
Even prime Agassi wouldnt match up well with Federer on any surface. He would beat him occasionaly on hard courts, the way he pushed him occasionaly even in old age, but would still most times lose. Probably always lose on grass, almost always on clay. Sampras of course owned Agassi on any faster surface, and I personally would favor the 94 and 97 version of Sampras over any Agassi at the Australian Open. And Agassi would have a nightmare time vs Nadal on clay or grass and even have trouble with him on hard courts. So I see him virtually shut out to this point. Given his inconsistency in his traditional prime age years his odds of taking advantage of avoiding Sampras, Federer, and Nadal on the right surfaces would be diminshed too.
I dont see Nadal matching up too well with Sampras except on clay of course. I would favor Nadal vs Federer on grass by a bit in a head to head, but Federer would have much more shot against Sampras than Nadal would. I see him getting a U.S Open by 28 if he has a year he both hits a great run of form like this year and avoids Sampras (who I feel he wouldnt beat on such a court), and an especialy in form version of Federer and Agassi.
Federer and Sampras would be pretty evenly matched on hard courts. Sampras would be favored on grass, Federer of course on clay.
And in case anyone thinks I am harsh on Agassi, Agassi as it was at age 28 had only 3 slams even without Federer and Nadal. I am not going to evaluate beyond that until I see how Federer ages further and how Nadal begins to age.