Question 486431
Let x chickens
Let y pigs
Then {{{x+y=13}}}
The animals have {{{2x+4y}}} legs, so {{{2x+4y=40}}}
The system of the equations
{{{system (x+y=13, 2x+4y=40)}}}
divide the second equation by 2
{{{system (x+y=13, x+2y=20)}}}
Subtract the first equation from the second one
{{{y=20-13}}}
{{{y=7}}} pigs
Substitute {{{y=7}}} into the first equation
{{{x+7=13}}}
{{{x=13-7}}}
{{{x=6}}} chickens