A group of mathematics teachers went to a restaurant. They agreed

to split the bill equally. When the bill arrived, two of them
discovered that they had forgotten their money. The others in the
group agreed to make up the difference by paying an extra $1.30
each. If the total bill was $78, how many teachers were in the
group?

let the number of teacher be n

so the bill per person should have been 78/n

Two did not have money, so they would be short 2*78/n = 156/n

The shortfall was made up by the remaining n-2 teachers each paying 1.30

so 1.3(n-2) = 156/n
1.3n^2 - 2.6n - 156 = 0
n^2 - 2n - 120 = 0
(n-12)(n+10)= 0

n=12 or n=-10

there were 12 teachers in the group.

The average, that is, the arithmetic mean, age of a group of

doctors and lawyers is 40. If the average age of the doctors is 35
and the average age of the lawyers is 50, then what is the ratio of
the number of doctors to the number of lawyers?

To solve this problem, we need to set up an equation based on the given information.

Let's assume that there are "x" teachers in the group. Since they agreed to split the bill equally, each teacher would pay an equal share of the bill.

Now, let's consider the situation when two teachers forgot their money. In this case, the remaining teachers agreed to pay an extra $1.30 each to cover the difference.

So, the total bill without the additional $1.30 per teacher can be represented as 78 - (x * 1.30). This represents the amount divided equally among all the teachers.

Since two teachers didn't pay, they should have paid $1.30 extra each. So, the remaining teachers would have paid (x - 2) * 1.30 extra in total.

Now, we can set up an equation based on the given information:

78 - (x * 1.30) = (x - 2) * 1.30

Let's solve this equation step by step:

1. Distribute 1.30 across the parentheses:
78 - 1.30x = 1.30(x - 2)

2. Distribute 1.30 further:
78 - 1.30x = 1.30x - 2.60

3. Simplify the equation by combining like terms:
78 + 2.60 = 1.30x + 1.30x
80.60 = 2.60x

4. Solve for x by dividing both sides of the equation by 2.60:
80.60 / 2.60 = x
x ≈ 31

Therefore, there were approximately 31 mathematics teachers in the group.