You're really not explaining yourself well. Perhaps a part of the problem is that you seem to want to test the player on whether they remember what they called themselves... which is idiotic, so of course we're not going to cotton on to what you're asking about because who would possibly want to do that?
Are you asking about how to get the player to enter some text? pbEnterText does that quite well, and it's even aptly named. It returns the text the player typed, so you'll want to save that into a variable somewhere for later usage.
If you simply want to compare the player's name to a word, just use if $Trainer.name=="Red".