How to solve variations to Eric the sheep problem

I originally saw the answer to a problem (https://math.stackexchange.com/questions/1586290/solving-the-eric-the-sheep-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?’