Firstly I would name all your rows (except the total) the same thing eg. Row1. Then for the total cells at the bottom you could put in formcalc in the calculate event of each total cell:
$ = sum(Row1[*].Cell1) // or whatever the row and cells are called.
Then you could put in the layoutReady event in formcalc:
if (Table1.Row4.Cell1[1] > Table1.Row4.Cell1[0]) then // renaming to whatever your total cells are called
Image1.presence = "visible"
Image2.presence = "hidden"
elseif (Table1.Row4.Cell1[0] > Table1.Row4.Cell1[1]) then
Image1.presence = "hidden"
Image2.presence = "visible"
endif