I am installing a subpanel in an out building that will be fed from a 50 amp subpanel in another out building ( going all the way to the main box is not an option). I only need 30 amps in the new bulding and I am using #6 wire for the 80' run between buildings. After the new subpanel and a 30 amp breaker will be another 55' run to a 30amp plug for a RV hookup. According to the interwebs I can use a #10 wire for that run. My question is when I'm calculating wire size is the length of the run considered from the new breaker to the outlet or do I need to use the distance from the original subpanel in the other building ? My thinking is I should use #6 all the way to the outlet as well.
You have 2 completely different questions in two completely different scopes. Don't confuse them. You must consider and answer each individually, and use the higher of the two answers.
Given the receptacle you want to use, which defines the breaker size, what is the minimum wire size you must use to keep from cooking the wire? A 30TT or 14-30 requires a 30A breaker, and the answer is "10 AWG wire".
Given the current you realistically expect to draw, actually, how much voltage drop do you feel will be acceptable to you? This is more complicated, starting with the "current draw, actually". It depends dramatically on what appliances are installed in your RV, which appliances you actually do use, and how much current those draw. Which you need to survey.
Remember -- having a 30A plug does not mean the RV draws 30A. It means that is the standard socket at RV parks, because some other RVs draw 30A.
Continuing part 2, you need to figure out the voltage drop you find acceptable under your practical load(s). I for one don't have a problem with a 5-6% drop, but then, I don't feed my family by upselling you into thicker wire. Those who do, say 3% is max. 3% is not mandatory, it boils down to what you find acceptable. The voltage drop cannot damage your wire, the required breaker in step 1 guarantees that.
As an example, let's say your practical load is 10A most of the time and you'd like to have a 3% drop then; or 20A in extreme circumstances and you don't mind a 6% drop then.
Plug those into a voltage-drop calculator, and there you go. (only consider the distance from the last subpanel to the RV).
Now, take the largest (smallest numerically) in step 1 (10AWG) and step 2 (in my example 12AWG). You must use at least 10AWG.
If you did the numbers again with 3% at 24A (the highest you are likely to draw continuously), I get 10 AWG.
If you want to for thicker wire nonetheless, that's between you and your wallet.
Now consider the new AA-8000 aluminum alloy wire. The ooga-booga about it never applied to AA-8000, nor to large conductors. At those large sizes with lots of metal content, it is far cheaper, and bonds better to large lugs, which are made of aluminum.
Starting at 6 AWG Cu, I start pricing it both ways - you need to run the numbers and typically go up a wire size i.e. 4 AWG Al. For the cost, you could even upsize the AL and reduce your voltage drop further.
If you upsize the feed to a subpanel, you can upsize the supply breaker. If you upsize the feed to a receptacle, you must use the breaker the receptacle requires.
"My question is when I'm calculating wire size is the length of the run considered from the new breaker to the outlet or do I need to use the distance from the original subpanel in the other building ?"
For voltage drop calculations, the whole wire run, from the main panel, will see voltage drop along the way. But because the upstream wire size is bigger, it will not contribute as much to the voltage drop as the last section.
I recommend you put the largest wire you can afford & is practical to handle.Someone down the road will thank you. You can have a 30A breaker protect a #6 wire feeding a 30A receptacle. A few years from now you might want to have a EV charger there and you'll be happy to already have the appropriate wire installed.