C = number of cars parked
We can write 3 formulas:
Formula 1: Total number of vehicles cannot exceed 80.
B+C<=80
The maximum income will be when it is 80
Formula 2: The space occupied cannot exceed 805
5C+32B<=805
The maximum income will be when it is 805
So let’s try to get 805 m^2 with 80 vehicles at the same time
B+C=80 -> C=80-B
5C+32B=805 -> C=(805-32B)/5
Let’s do the equalization method:
80-B=(805-32B)/5
5*(80-B)=805-32B
400-5B=805-32B
32B-5B=805-400
27B=405
B=405/27=15
C=80-15=65
Let’s verify:
5*65+32*15=805 -> OK
Formula 3: Income=6*15+2*65=220
If we put more buses, it doesn’t fit. Let’s try with 1 more bus and 1 less car:
5*34+32*16=832>805 -> NOT OK
If we put less buses, it’s less income. Let’s try with 1 less bus and 1 more car:
Income=6*14+2*66=216 -> Not so convenient.
So the optimum is 15 buses and 65 cars.