Please, read my comment to the question first.
Second guess:
var result = items.SelectMany(i=>
i.YearlyAmt.YearlyAmts.Select(ya => new
{
ContributionId = i.Contribution.ContributionId,
AccountId = i.Contribution.Account.AccountID,
Type = i.Contribution.Account.Type,
Year = ya.year,
NetAmount = ya.NetAmount
}))
.GroupBy(x=>new{Year = x.Year, Type = x.Type})
.Select(grp=>new
{
Type = grp.Key.Type,
Year = grp.Key.Year,
NetAmount = grp.Sum(a=>a.NetAmount)
});
In your case, above code should return:
Type Year NetAmount
401K 2016 50000
401K 2017 51000
401K 2018 52020
VA 2016 40000
VA 2017 40800
VA 2018 41616