The equation given in the question has to be studied minutely. Only thing that needs to be kept in mind are the signs.
(x+f) + 2 = j
x + f + 2 = j
x + f = j - 2
x = j - 2 - f
x = j - (2 + f)
I hope the procedure is clear enough for you to understand. I also hope that this is the answer that you were looking for and the answer has actually come to your desired help.