You have two unknowns - the number of people (P) and the number of horses (H). You can set up two equations to solve for these two unknowns. Every person and every horse has 1 head, so:
[tex]P+H=74[/tex]
Also, every person has 2 legs but every horse has 4 legs, so:
[tex]2P+4H=196[/tex]
We can now solve by rearranging the first equation (H = 74 - P), and subbing that value into the second equation: