Let there be x cakes of first kind and y cakes of second kind. Therefore, x ≥ 0 and y ≥ 0
The given information can be complied in a table as follows.


Total numbers of cakes, Z, that can be made are, Z = x + y
The mathematical formulation of the given problem is Maximize Z = x + y … (1) subject to the constraints,

The feasible region determined by the system of constraints is as follows.

The corner points are A (25, 0), B (20, 10), O (0, 0), and C (0, 20).
The values of Z at these corner points are as follows.

Thus, the maximum numbers of cakes that can be made are 30 (20 of one kind and 10 of the other kind).