it is pretty simple. you join the table Staff and Timesheet without stating what combines both tables.
Your query needs something like below:
select count(distinct Name) as NoOfPersons,sum(duration) as tot
from Staff as s,Timesheet as t
where s.StaffCategoryID='1'
and s.fieldname = t.fieldname