What should I do masteries wise for Tristana?
If you wanna play it high damage and low tank and stay firing from afar (What she was built to do tbh but it can be hard to play ad carry) then for masteries take attack damage mostly. Depending on your summoner level try to aim for 21 in offence and 9 in defense but if you don't have enough just put it all in offence.
Items for long range high damage would optimally be: Berserker's Greaves, Infinity Edge, Phantom Dancer, Bloodthirster, Last Whisperer and a defensive item (Quiksilver sash, Banshee's veil, Guardian Angel, Frozen Mallet or If you're feeling ballsy, another Phantom Dancer)
You can buy these items in any order depending on the game ^ And you can throw in a few doran's blades to help your early game if you want too.
There are other tristana builds for other jobs but it sounds like you wanna be the guy at the back putting out lots of damage at range. Phantom dancer is great for the movement speed too as it let's you run fast so you can kite the enemy and stay behind your team.
It's sad though because good ad carry plays rely on a team to stand as a meat shield in front of you and at lower levels this can be troublesome to get happening. Just thank god if your team manages to protect you in team fights. If it's apparent that they aren't just sit in the fog of war till half the team fight is done and then come into the fight at long range. This way the enemy would likely have used their gap closers/crowd control on your friends already.
If half of the terminology in here didn't make sense feel free to ask what it means :P