If they need an average of $50\%$ from $7$ tests, the total of their percentages needs to be $350\%$. So far they have got $164\%$, so they need another $186\%$ from the remaining $4$ tests, which is an average of $46.5\%$.
The calculation is $$\frac{(x+y)\times\text{pass mark}-\text{total so far}}{x}.$$