the total number of horses and people at a riding academy one sunday was 39.The total number of legs at the academy that day was 124.How many people were at the riding academy that sunday?

H+P=39

4H+2P=124

H=39-P
4(39-P)+2P=124
solve for P there, then go back and solve for H.

To find the number of people at the riding academy on that Sunday, you can set up a system of linear equations based on the given information. Let's solve it step by step:

Let's assume the number of horses is represented by 'h' and the number of people is represented by 'p'.

1. We are given that the total number of horses and people is 39:
h + p = 39 -- Equation 1

2. We know that the total number of legs (4 per horse and 2 per person) is 124:
4h + 2p = 124 -- Equation 2

Now we can solve this system of equations:

First, let's multiply Equation 1 by 2:
2(h + p) = 2(39)
2h + 2p = 78

Next, subtract Equation 2 from this new equation:
2h + 2p - (4h + 2p) = 78 - 124
2h + 2p - 4h - 2p = -46

Simplify and combine like terms:
-2h = -46
Divide both sides of the equation by -2:
h = (-46) / (-2)
h = 23

Now, substitute the value of h back into Equation 1 to find p:
23 + p = 39
p = 39 - 23
p = 16

Therefore, there were 16 people at the riding academy on that Sunday.