We are given 5kg of flour and 1 kg of fat. Let x be the number of Cakes of Type1 and y be the number of cakes of Type2 that we can make. Our problem is to maximize x + y.
Clearly, x, y ≥ 0. Let us construct the following table from the given data (all numbers converted from kg to g)

Cake1 
Cake2 
Requirements 
Flour A 
200 
100 
5000 
Flour B 
25 
50 
1000 
Since we have 5000g of Flour and 1000g of fat, we have to maximize x + y, given the following constraints:
$(1): 200x + 100y \leq5000 \to 2x+y \leq 50$
$(2): 25x + 50y \leq 1000 \to x+2y \leq 40$
$(3): x \leq 0, \; (4): y \leq 0$
$\textbf{Plotting the constraints}:$
Plot the straight lines 2x+y = 50 and x+2y = 40.
First draw the graph of the line 2x+y = 50. If x = 0, y = 50 and if y = 0, x = 25. So, this is a straight line between (0,50) and (25,0).
At (0,0), in the inequality, we have 0 + 0 = 0 which is≤ 0. So the area associated with this inequality is bounded towards the origin.
Similarly, draw the graph of the line x + 2y = 40. If x = 0, y = 20 and if y =0, x = 40. So, , this is a straight line between (0,20) and (40,0).
At (0,0), in the inequality, we have 0 + 0 = 0 which is ≤ 0. So the area associated with this inequality is bounded towards the origin.
$\textbf{Finding the feasible region}$:
We can see that the feasible region is bounded and in the first quadrant.
On solving the equations 2x + y = 50 and x + 2y = 40, we get,
2 (40 – 2y) + y = 50 $\to$ 80 – 4y + y = 50 $\to$ 2y = 30 $\to$ y = 10.
If y = 10, then x = (50 – 10)/2 = 20.
$\Rightarrow x = 20, y = 10$
Therefore the feasible region has the corner points (0,0), (0,20), (20, 10), (25,0) as shown in the figure.
$\textbf{Solving the objective function using the corner point method}$:
The values of Z at the corner points are calculated as follows:
Corner Point 
x+y 
O (0,0) 
0 
C(0,2) 
20 
E(20,10) 
30 (Max Value) 
B(25,0) 
25 
$\textbf{The maximum number of cakes we can make is 30, 20 of one kind and 10 of another. }$