IF B5 value (in August sheet) + E5 value (in July sheet) is greather than 0 then result is B5 value (August sheet) + E5 value (July sheet), if not then write 0.

In your E5 it means

20+650>0 - the condition is valid that´s because in E5 value 670 is (because formula says if the condition is valid then put that sum in E5 cell value)

If you want to see what´s behind the formula, just mark cell with formula and go to

__Formulas > Evaluate formula__and you will see the steps formula counts with and values for each reference

F5 has the same logic