# How would I plot the inequality lines together with the intersection plot of the inequalities?

For example, I've got the following code:

Plot[{x >= 5, y >= 8, x + 2y <= 64, x + y <= 40}]


This would plot:

Now, this is fair enough. It shows me the graphical solution of my four inequalities, however, I also would like to have the lines of those inequalities to be plot as well alongside the graphical solution of my inequalities. How would I do that?

Legended[
Show[
RegionPlot[
x >= 5 && y >= 8 && x + 2 y <= 64 && x + y <= 40, {x, 0, 40}, {y,
0, 35},
Frame -> True,
FrameLabel -> (Style[#, 14, Bold] & /@ {x, y}),
PlotPoints -> 100],
ContourPlot[
Evaluate[
Tooltip /@ {x == 5, y == 8, x + 2 y == 64, x + y == 40}],
{x, 0, 40}, {y, 0, 35}],
PlotLabel -> Style[
x >= 5 && y >= 8 && x + 2 y <= 64 && x + y <= 40,
14, Bold]],
Placed[
LineLegend[
ColorData[97] /@ Range[4],
{x == 5, y == 8, x + 2 y == 64, x + y == 40}],
{0.75, 0.75}]]


Try

Show[
...yourexistingplot...,
ContourPlot[{x == 5, y == 8, x + 2y == 64, x + y == 40},{x,5,35},{y,5,30}]
]


which should overlay your two plots and show you your colored lines along the edges.

You can adjust the PlotRange option as needed to frame the plots.

Just a slightly compact way of Bob Hanlon's answer (which I voted for). Note ContourPlot frames and uses Tooltip. The aesthetics and control of Legended may be preferred.

cons = {x >= 5, y >= 8, x + 2 y <= 64, x + y <= 40};
eq = cons /. {(a_ >= b_) :> (a == b), a_ <= b_ :> a == b};
Show[RegionPlot[lab = Fold[And[#1, #2] &, cons], {x, 0, 35}, {y, 0, 35},
PlotLabel -> Style[lab, Bold]],
ContourPlot[Evaluate[eq], {x, 0, 35}, {y, 0, 35}, PlotLegends -> "Expressions"]]