Opposite of event.target

I’m trying to compare two text boxes.
I can trace the text from the clicked on target, but I need to compare it to the unclicked text box and I can’t think of how to without going in a huge circle of comparing everything. The text for each of two text boxes comes from an Array.

It’s basically which is a higher number box A or B. They array is always shuffled so there’s never a correct answer. By that I mean I have to compare each answer each time.

Sorry if this doesn’t make sense, I barely know what I am asking.