A catering company charges $300 plus $40 per guest for a wedding. Sarah and Eric do not want to spend more than $5,000 on catering. Write and solve an inequality in terms of the number of guests, g, that can be invited.

Let's denote the number of guests Sarah and Eric can invite as g. The catering company charges $300 for the event plus $40 per guest. Hence, the total cost C for g guests can be expressed as:

C = 300 + 40g

Sarah and Eric have set a budget of not more than $5,000, which translates to:

C ≤ 5,000

Substitute the expression for C:

300 + 40g ≤ 5,000

To solve the inequality for g, follow these steps:

1. Subtract 300 from both sides:
40g ≤ 5,000 - 300

2. Simplify the right-hand side:
40g ≤ 4,700

3. Divide both sides by 40 to solve for g:
g ≤ 4,700 / 40

4. Calculate the right-hand side:
g ≤ 117.5

Since you can't invite half a person, Eric and Sarah can invite a maximum of 117 guests to stay within their $5,000 budget for catering.