Even though we are using variables, we still know that "difference" means subtraction. So, if the larger is x1 and x2, those variables go first. The smaller, y1 and y2 will go second. So our problem will look like this:
(x1 < x2 ? x2 : x1) - (y1 < y2 ? y1 : y2)
This answer would be false srry if im wrong but thats what i think
f(4)=9*4-2 =34 & g(4)= -2*4 =-8 then,
f(4)- g(4) = 34+8= 42