I have a profit function = -100 + 80a - 0.1a^2 + 100b - 0.2b^2

the question states relationg to the output of two products if total production (a + b = 500) find the solution that will maximize profit. solve the lagrange multiplier also.

so i have reworked the formula to show = -100 + 80a - 0.1a^2 + 100b - 0.2b^2 - λ(500 - a - b)

fa = 80 -0.2a - λ

fb = 100 -0.4b - λ

fλ = -500 + a + b

i know i have to set fa, fb and fλ to 0 to solve the maximization point so im just not sure how to go from here using substitution to solve each p.derivative.

if someone could help would be great