document.write( "Question 264037: Inside a barn are lambs and people. If we count 30 heads and 104 legs in the barn, how many lambs and how many people do we have in the barn? \n" ); document.write( "
Algebra.Com's Answer #194471 by josmiceli(19441)\"\" \"About 
You can put this solution on YOUR website!
Let \"p\" = number of people
\n" ); document.write( "Let \"b\" = number of lambs (b is for baa)
\n" ); document.write( "They all have 1 head each, so
\n" ); document.write( "(1) \"p+%2B+b+=+30\"
\n" ); document.write( "People have 2 legs, and lambs have 4, so
\n" ); document.write( "(2) \"2p+%2B+4b+=+104\"
\n" ); document.write( "Multiply both sides of (1) by \"2\" and
\n" ); document.write( "subtract from (2)
\n" ); document.write( "(2) \"2p+%2B+4b+=+104\"
\n" ); document.write( "(1) \"-2p+-+2b+=+-60\"
\n" ); document.write( "\"2b+=+44\"
\n" ); document.write( "\"b+=+22\"
\n" ); document.write( "and, since
\n" ); document.write( "\"p+%2B+b+=+30\"
\n" ); document.write( "\"p+=+30+-+22\"
\n" ); document.write( "\"p+=+8\"
\n" ); document.write( "There are 8 people and 22 lambs
\n" ); document.write( "check answer:
\n" ); document.write( "(2) \"2p+%2B+4b+=+104\"
\n" ); document.write( "\"2%2A8+%2B+4%2A22+=+104\"
\n" ); document.write( "\"16+%2B+88+=+104\"
\n" ); document.write( "\"104+=+104\"
\n" ); document.write( "OK
\n" ); document.write( "
\n" );