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:
![\begin{gathered} 520+2\cdot55 \\ =520+110 \\ =630 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/wghhfq6w7yrmphbrx0l1cb521r5bjdo61q.png)
So the computer costs $630.