Question 741637
Let X=number of police officers (each with 2 legs)
y= number of dogs (with 4 legs each)


The equation for recruits is
x+y=14


The equation of legs is 
2x+4y=38  which can be reduced to x+2y=19


Multiply first equation by -1:
-x - y = -14
 x +2y =  19


Add these equations together, and you get
y= 5 dogs


Since x+y=14, 5 dogs means there are 9 police, with legs = 20 for dogs, 18 for police for a total of 38 legs.  It checks.


Dr. Robert J. Rapalje, Retired
Seminole State College of Florida