If Ryan walked 8 dogs total, this can be represented by x+y=8. If he earns $5 for small dogs and $8 for large dogs, and made $55 total, then we can represent this with 5x+8x=55. By solving this system of equations, we know Ryan must have walked 3 small dogs.