Normally you divide the total angle by 2, but not in your example. A 40 and a 38° cut will result in a total angle of 78°.
The same with the other two joints: you have one 98° and one 106°.
The total angle is 156° & you have already specified 80 and 76 as the complimentary angles. Common sense also tells us looking at it, a 40° angle would be much, much steeper than the pic shows.
I would point out that unequal angles will result in different miter widths so either the inside or outside surfaces will not line up perfectly. It will probably be a small discrepancy, 80 vs 76, but just something to think about and do some test pieces first.
Hope I'm making myself clear.