The popultion of Medford High is 800 students & the population of WEstville High is 1240 students. Medfords pop. has been increasing by 30 students per year, while westville has been decreasing by 25 students per year. In how many yearas will the populations be the same. how many students will that be?

I got 8 yrs 1040 students, but doing it long way.
Pls show me how to solve alg way

800 + 30x = 1240 -25x

55x = 440

x = 8 (years from now)

To solve this problem algebraically, we need to set up equations for the populations of both Medford High and Westville High. Let's use the variable "t" to represent the number of years.

Population of Medford High after t years: 800 + 30t
Population of Westville High after t years: 1240 - 25t

To find the number of years when the populations will be the same, we can set the two equations equal to each other and solve for t:

800 + 30t = 1240 - 25t

Simplify the equation by combining like terms:

55t = 1240 - 800

55t = 440

Now, divide both sides of the equation by 55 to solve for t:

t = 440 / 55

t = 8

So, it will take 8 years for the populations to be the same.

To find out the number of students at that time, substitute t = 8 into either equation. Let's use the equation for the population of Medford High:

Population of Medford High after 8 years: 800 + 30(8) = 800 + 240 = 1040

Therefore, in 8 years, the populations will be the same, with a total of 1040 students.

To solve this algebraically, let's represent the number of years as 'x'.

Let's denote the initial population of Medford High as M and the initial population of Westville High as W.

We are given the following information:
M = 800
W = 1240
M is increasing by 30 students per year
W is decreasing by 25 students per year

After x years, the population of Medford High will be M + 30x, and the population of Westville High will be W - 25x.

To find the number of years when the populations are the same, we set up the equation:
M + 30x = W - 25x

Substituting the given values:
800 + 30x = 1240 - 25x

Now, let's solve for x:
800 + 30x + 25x = 1240
55x = 440
x = 440/55
x = 8

Therefore, it will take 8 years for the populations to be the same.

To find the number of students at that time, substitute the value of x into either M + 30x or W - 25x.

M + 30(8) = 800 + 240 = 1040
So, after 8 years, the number of students at both schools will be 1040.