You should first understand how colspan and rowspan work, unless, of course, you know how they work. Then make a pre-calculation for the entire table. Actually nobody will be smart in doing this in the evening, so I advise you tomorrow morning, with a fresh head, stand up, eat, draw a more pleasant picture and start thinking about the conditions and blocks to add colspan and rowspan, ticking with a pen or pencil marks on a white A4 sheet (this is a must! Verified).
Because 3x3 grid, then there are different ways to create a table. The easiest way is to do a search of all positions and put it somewhere. And then just watch the values. But it is a chore.
Dare! But if the brain suddenly gets stuck at some point, then write, we will help :-) But we will only help, but not write.