FYI - 338 lapua are not allowed in most practical long range comps (max 300 win mag and 3150 fps velocity). Big magnums make spotting your own hits/misses difficult, burn barrels faster, and are more expensive to shoot. Getting to be a proficient long range shooter is more about practice and less about caliber. However, a short action 6-6.5mm (243, 260 Rem, 6.5 CM, etc) would be a good compromise of easy shoot ability and ballistic performance. A good 308 would also be a reasonable platform with which to learn and a variety of good hunting ammo/bullets available. If you really want a magnum and to compete, consider a 7mm RM/WSM or 300 win mag. Just remember, you may be shooting 150 rounds in a typical 2 day comp.
For optics, you need to read and decide if you want a FFP or SFP reticle scope. A 3-12, 3-15, 4-16, or 5-25 will all be adequate for comps if well made and have reliable turrets and internals. NF, Bushnell, Leupold, Schmidt & Bender, Steiner, Khales, Hensoldt, and Premier all make good to great tactical scopes that will get you in the game. Like most things, you get what you pay for in a scope but in general you can expect to spend anywhere from $1300-$4000 on optics.
For your rifle, if in doubt a basic 700 or savage will be a cheap initial investment. However, it may require a new stock, barrel, bolt knob, possible trigger job/group, bottom metal/mags, truing, and bedding to shoot/fit well.
I am partial to Sako TRGs. They require nothing and are extremely accurate and comfortable out of the box. They are an excellent value for the money invested when compared to a custom and are known to be very reliable in operation. You may be able to find a nice used TRG in the $2000s or new for around $3200.
Good luck,
TKAB