SUMIF accepts only a single condition.
SUMIFS accepts more than one condition, and ALL must return TRUE for the associated value to be included in the sum.
If I'm reading your statement correctly, you want the value to be included in the sum IF the associated value in F meets one condition OR the associated value in FO meets the second condition. On the face of it, that's pretty easy, but I assume you do not want a value included twice when both conditions are met.
If that assumption is correct, this may do the trick. To keep the syntax the same, I've used SUMIFS throughout, even though some of the expressions involve only one condition.

The formula shown is in B3:
SUM(SUMIFS(2:2,3:3,"y"),SUMIFS(2:2,4:4,"y"),−SUMIFS(2:2,3:3,"y",4:4,"y"))
The first SUMIFS sums the values in row 2 where condition 1 is met. ( 2 )
The second SUMIFS sums the values in rw 2 where condition 2 is met. ( 2 )
The third SUMIFS sums the values where both conditions are met, ( 1 ), and applies a - to this sum.
SUM sums the three results (2, 2, -1) to arrive at the requested sum value ( 3 ).
Regards,
Barry