How to solve variations to Eric the sheep problem

I originally saw the answer to a problem ( And this solution worked for the original question (however this solution did not work for questions as below). How would you go about solving a question like this (algebraically): ‘there are 119 sheep infront of Eric and for every 3 sheep that are shawn, eric moves foward five sheep. How many sheep are shawn before eric?’