Question 1084852

A police academy is training {{{14}}} new recruits. 
Some are working dogs and others are police officers. 
let dogs be {{{d}}} and police officers {{{p}}}

so, {{{d+p=14}}}........eq.1

There are {{{38}}} legs in all.

 dogs have {{{4}}} legs; so,  the number of dogs legs is {{{4d}}} 
 police officer have  {{{2}}} legs; so,  the number of police officers legs is {{{2p}}} 

then, {{{4d+2p=38}}} ........eq.2

solve the system:
{{{d+p=14}}}........eq.1
 {{{4d+2p=38}}} ........eq.2....both sides divide by {{{2}}}
--------------------------------------------

{{{d+p=14}}}........eq.1
 {{{2d+p=19}}}.......eq.2
-----------------------------------------subtract eq1 from eq2

 {{{2d+p-(d+p)=19-14}}}.......eq.2

 {{{2d+p-d-p=5}}}

 {{{d=5}}}-> there was {{{5}}} dogs

{{{5+p=14}}}........eq.1
{{{p=14-5}}}
{{{p=9}}}-> there was {{{9}}} police officers