cx=4;cy=-2;
constraints1=2x+4y≤12&&x+y≤5&&y≤5/2&&y≥-4+x&&x≥0&&y≥0;
feasible1=RegionPlot[constraints1,{x,0,6},{y,0,3},PlotPoints->250]

Manipulate[Show[feasible1,Plot[c/cy-cx/cy x,{x,0,6},PlotRange->{0,3},PlotStyle->{Thick,Black}]],{{c,10},-15,40}]

Minimize[{cx x+cy y,constraints1},{x,y}]
Maximize[{cx x+cy y,constraints1},{x,y}]

lines1=Plot[Table[c/cy-cx/cy x,{c,-10,30,1}],{x,0,12},PlotStyle->Black];
min=Plot[c/cy-cx/cy x/.c->-5,{x,0,12},PlotStyle->Red];
max=Plot[c/cy-cx/cy x/.c->17,{x,0,12},PlotStyle->Red];
Show[feasible1,lines1,min,max]

eqn={2x+4y==12,
x+y==5,
y==5/2,
y==-4+x,
x==0,
y==0};

pairs=Flatten[Table[{i,j},{i,1,Length[eqn]-1},{j,i+1,Length[eqn]}],1]
lineeqns=Table[Solve[eqn[[i]],y],{i,1,Length[eqn]}]
Show[Table[Plot[y/.lineeqns[[i]],{x,0,7},PlotStyle->Thick],{i,1,Length[lineeqns]}],feasible1,AspectRatio->1]

sol=Flatten[Table[Solve[eqn[[pairs[[i,1]]]]&&eqn[[pairs[[i,2]]]]],{i,1,Length[pairs]}],1]

values=Table[cx x+cy y/.sol[[i]],{i,1,Length[sol]}]
Min[values]
Max[values]

(*What went wrong?*)

(*...*)

(*We did not check if the intersection points are indeed vertices, i.e., feasible solutions!*)

constraints1/.sol[[1]]
constraints1/.sol[[4]]

vertices={};
For[i=1,i≤Length[sol],i++,
If[constraints1/.sol[[i]],vertices=Join[vertices,{sol[[i]]}]]]
vertices

values=Table[cx x+cy y/.vertices[[i]],{i,1,Length[vertices]}]
Min[values]
Max[values]