The reason is that the statement
select sum(e.salary) , sum(p.cost) from employee e , project p;
makes a
Full Outer Join
, due to which the rows in table employee are
repeated 4 times
each, hence the Sum(e.salary) = 4 * 13700 = 54800 and the rows in table project are
repeated 5 times
each so that the Sum(p.cost) = 5 * 2100 = 10500.