Sorry about the confusion. At the start of the game, the system should generate five pairs of letters in boxes. I thought starting with one letter and one row would be the easiest way to figure out the logic.
I've gotten as far as creating a layout and naming boxes. Someone much younger and smarter than me told me this would be easy to build on this platform. I think I'm in over my head. The world needs ditchdiggers, too.
Many years ago I thought I could never code/make games. I was 100% convinced of it, but some people around me told me it was possible, and I was lucky to believe them (I have since worked on many projects as a programmer and web dev). I'm telling you right now, you can do this, and we are all here to help you.
Now, concerning your specific issue, firstly I'd suggest going through dop2000 idea, it's very informative and generally useful.
Secondly, if I understand correctly, I would make some empty String variables to be the containers for your pairs.
Then I'd make dop2000 code into a function that returns one of the random letters, and use a "repeat" or "for" loop to run the function as many times as you need and populate the empty strings.
All the best! You can do this.