In Pathfinder v1, the rules for ranged sneak attack and sniping can be a bit complex, so I'll do my best to explain them.
First, let's start with the basics of sneak attack. In order to perform a sneak attack, a rogue must be able to catch an opponent off-guard and strike a vital spot for extra damage. This typically requires the rogue to have advantage on the attack roll, which can be gained through flanking, using the Stealth skill to hide and attack from surprise, or by using certain feats or abilities.
When making a ranged sneak attack, the rules are similar, but with a few key differences. First, the rogue must be within 30 feet of the target to make a ranged sneak attack. Second, the rogue must have line of sight to the target, and the target must be unaware of the rogue's presence or otherwise considered flat-footed. Finally, the rogue must be wielding a ranged weapon that is capable of dealing sneak attack damage, such as a sling, crossbow, or bow.
Now, let's talk about sniping. The Sniping feat allows a rogue to make ranged sneak attacks from a greater distance, up to a maximum of 10 times their normal sneak attack range. So, for example, if a rogue has a sneak attack range of 30 feet, they could make a ranged sneak attack from up to 300 feet away with the Sniping feat. However, there are some additional requirements for making a successful sniping attack.
First, the rogue must have a clear line of sight to the target, and there can be no other creatures within 10 feet of the target. Second, the rogue must make a successful Spot check to detect the target, with a DC equal to 10 + the target's Spot modifier + the range penalty for the attack. Finally, the rogue must make a successful attack roll against the target's AC, just like a normal ranged attack.
It's worth noting that the Sniping feat also allows the rogue to ignore cover and concealment penalties up to a certain degree, depending on the range of the attack. For example, at 30 feet, the rogue can ignore up to 20% concealment, while at 100 feet, they can ignore up to 40% concealment.
In terms of combining ranged sneak attack and sniping, it's possible to make a ranged sneak attack from a greater distance using the Sniping feat. However, the rogue must still meet all the requirements for making a ranged sneak attack, including having advantage on the attack roll or using the Stealth skill to gain surprise. Additionally, the rogue must still make a successful Spot check and overcome any cover or concealment penalties in order to make the attack.
Overall, ranged sneak attack and sniping can be powerful abilities for a rogue, allowing them to deal extra damage from a distance and take out enemies before they even know what hit them. However, they also require careful planning and execution, as well as a good understanding of the rules and mechanics involved.