First coin costs $50, the second $100, the third $150, ... the nth costs $50n.
When we add them we have 50(1+2+3+...n). We can write this 50((1+n)+(2+n-1)+(3+n-2)+...).
This is 50((n+1)+(n+1)+(n+1)+...). Because we're taking these in pairs there are n/2 of them, so we have 50n(n+1)/2=300000000. Divide by 50: n(n+1)/2=6000000. Multiply by 2:n(n+1)=12000000.
Now we have: n^2+n=12000000. We can add 1/4 to each side: n^2+n+1/4=12000000+1/4.
This is the same as (n+1/2)^2=12000000.25, so n+0.25=3464 (approximate square root of 12,000,000) and n=3463.75. We can only buy whole coins so we could buy 3,463. Let's see what that value is, n=3463: 3463*3464/2=5997916 coins worth $299,895,800. The most expensive coin would be the last one $173,150.