How far and how accurate?
You can start with some factory rifles in .223 or .243 or .308, common calibers are easy to find things for.Nothing wrong with a used rifle especially if you will be upgrading it.
But if you wanna buy just one rifle. Go with something in a 700 Remington as this action can be worked with great success as time goes on. You can re-barrel this action also later on.
Optics- The sky is the limit, literally you can spend 10 or 11K on super high end scopes, but for $1000-$2000 you can be competitive and consistent.As for brands . Bushnell 6500, Sightron, Night Force, Zeiss, Leupold, all personal preference after you look through a few.
Rings and bases can be addressed when you purchase and mount your scope. Good bases can be over $100 as can some rings. You optics supplier will recommend items for use with the scope you purchase.
I know that a couple of the fellows who shoot competitively will speak up on this one and they are very knowledgeable, very much worth hearing what they have to say!
Forgot to mention, on a rifle you will be upgrading, it may be a good candidate to practice some stock work also, bedding, floating, etc.........Never know you could tune yourself a real shooter!