2. (8 points) A shepherd was herding a flock of sheep to graze. After one ram ran out, he counted the number of sheep and found that the ratio of rams to ewes among the remaining sheep was 7:5. After a while, the ram that ran out returned to the flock, but a ewe ran out instead. The shepherd counted the sheep again and found that the ratio of rams to ewes was 5:3. How many sheep were there in the flock originally?
【Answer】Solution: According to the analysis, at the beginning, one ram was missing, the ratio was $7: 5=14: 10$, later, the ram returned to the flock,

then the number of rams should be increased by 1, and the number of ewes should be decreased by 1, at this point the ratio is $15: 10=(14+1):(10-1)$, therefore, the original number of rams was 15, and the number of ewes was: 10, the total number of sheep was: $15+10=25$.

So the answer is: 25.