Ah you want to sum the trees per person, then get who has the most. Sorry, late in the day for me. Here's just one way to do it. There are more, but this will get you the person with the most trees.
(I'm assuming thats what you want?) I made temp tables called #tree and #people instead of tablea and tableb.
--Solution 1
select a.people,b.surname,a.trees
From (Select top 1 people,SUM(trees) as trees
from #tree
Group by people
Order by SUM(trees) desc) a
join #people b
on a.people = b.people