You can put this solution on YOUR website! .
D=number of dogs; B=number of birds
D+B=31
D=31-B
.
4D+2B=104 Substitute for D.
4(31-B)+2B=104
124-4B+2B=104
-2B=-20
B=10 ANSWER 1: There were 10 birds.
D=31-B=31-10=21 ANSWER 2: There were 21 dogs.
.
CHECK:
4D+2B=104
4(21)+2(10)=104
84+20=104
104=104