Suggestion to handle two quadratic roots in two cells

I am working on completing the square activity and want to let my students know if they got the right answers. This is supposed to be learning activity and they should know if one answer is correct to be able to fix the error. So far if they answer correctly on both they get a check-mark, but if they miss one I could not check one that is correct because cell are linked in logic.
I would appreciate if one more set of eyes check and code flow.
The logic is in the table named t22.
I’ll attach the code and activity if someone has time to look at it.
Thank you in advance.

boolHF1= not(this.cellHasFocus(1,2))
boolHF2= not(this.cellHasFocus(2,2))

bool1=boolHF1 and ((rootC1 = xR1 and rootCs2 = "")
or (rootC2= xR1 and rootCs1="")
or (rootC1 = xR1 and rootC2 = xR2)
or (rootC1 = xR2 and rootC2 = xR1)
or (rootCs1="n" or rootCs1="N" and isUndefined(x1)) 
or (rootCs2="n" or rootCs2="N" and isUndefined(x2)))

bool2=boolHF2 and ((rootC2= xR1 and rootCs1 = "")
or (rootC1=xR1 and rootCs2 = "")
or (rootC1 = xR1 and rootC2 = xR2)
or (rootC1 = xR2 and rootC2 = xR1)
or (rootCs1="n" or rootCs1="N" and isUndefined(x2)) 
or (rootCs2="n" or rootCs2="N" and isUndefined(x1)))```

[Completing the square](


(You forgot to link your activity)…

Can you make a difference function and evaluate a few to see they’re within some tolerance?

bool1=checkF.evaluateAt(1)<=0.5 and checkF.evaluateAt(5)<=0.5 and etc...

They type the values in table cell they and they can change the order too. The value for x1 can be in the cell 1 and or 2. Same works for x2.
I put it in op but it didn’t work.
It is tricky because both cells obey the same rules.
Thank you.