Answer:
The answer to your question is:  Total surplus = - x² + 400 x + 10,000
Step-by-step explanation:
Data
Alphaville    - 2x² + 500 x
Betaville     x² - 100 x + 10,000
Surplus of both towns = ?
Process
Add the surplus of both towns
Total surplus = Alphaville surplus + Betaville surplus
Total surplus =  - 2x² + 500 x +  x² - 100 x + 10,000
Total surplus = - x² + 400 x + 10,000