I think according to rule of indices yhat should be
yhat= 1 / [ 1 + e^(a22-a21)]
Yes, you’re right. It should have been e^{a22 - a21}