peterch:schellen:What level is this question for? It seems to me that algebra is a good way to solve it but I think you'd better wait for someone with more experience.
Sorry, it was for primary 4.
The answer is 12 sheep and 14 chickens. 12x4=48( 4 legs per sheep) and 14x2=28 (2 legs per chicken).