There are:
36 heads and 102 feet.
The total number of animals (pigs+geese) are 36, also we know that the pigs have 4 feet and the geese 2.
Therefore, the equations to find it will be:
1. For the heads:
[tex]36=p+g\text{ \lparen1\rparen}[/tex]For the feet:
[tex]102=(4*p+2*g)\text{ \lparen2\rparen}[/tex]Where p=pigs and g= geese.
Solving the equations using substitution method:
Isolating p in (1):
[tex]36-g=p\text{ \lparen3\rparen}[/tex]Substituing (3) in (2):
[tex]\begin{gathered} 102=4p+2g \\ 102=4(36-g)+2g \end{gathered}[/tex]Solving for g:
[tex]\begin{gathered} 102=144-4g+2g \\ 102-144=-2g \\ -42=-2g \\ g=\frac{42}{2}=21 \end{gathered}[/tex]Finally, putting g=21 in (3):
[tex]\begin{gathered} p=36-g \\ p=36-21=15 \end{gathered}[/tex]Answer: There are 15 pigs and 21 geese.