@raul44,
let x = shepherd1 and y = shepherd 2
x+1 = 2 times(y-1), and simplifying x+1 = 2y-2 gives x =2y-3 in the first equation
y+1 = x-1 in the second equation, and substituting for x in equation 2 gives
y+1= (2y-3) -1 therefore y= 5 and solving gives x= 7