First let's calculate how much money Philip saves each week.
In 4 weeks, he saved 520 - 300 = $220, so he saved 220/4 = $55 per week.
Then, we have that after 2 weeks of saving, he still needed $520, so before this saving, he needed:
[tex]\begin{gathered} 520+2\cdot55 \\ =520+110 \\ =630 \end{gathered}[/tex]So the computer costs $630.