So we know that an average is the sum of the scores divided by the number of scores that were added together. In this case we are going to be dealing with 4 tests. So let's say x is the score for our fourth test. We can create this equation:

So then we need to simplify the top:

Then multiply by 4 on both sides to get rid of the denominator:

Then solve for x:

So now we know that Sam needs to score a 67 on the fourth test to have an average score of 50.