Will be really appreciated if you helped me with this and explained

Answer: D) 8
If there's a way to solve this fast I totally forgot it but this was easy enough to solve with substitution. I'd ask your teacher about this one but the answer is definitely D) 8.