The purpose behind Ryo's trip to the Cloud Village was very simply collecting the Nibi's Chakra.
He had already collected the Nanabi's Chakra in the Waterfall Village, but since Korin's body only lacked Yin Chakra now, Ryo speculated that it wasn't going receive much change upon receiving Chomei's Chakra.
Therefore, Ryo planned to collect the Nibi's Chakra whenever he had a window to do so.
Of course, he was in no hurry; the Nibi was in the Cloud Village after all. After the 3rd Shinobi World War, the Cloud Village emerged as the village with the least losses after Konoha. Even after losing the 3rd Raikage, they still had his son A, Killer B, and Yugito Nii.
Killer B in particular was very special; he had mastered the use of his Biju's powers beyond any other Jinchuriki at the time. Even if Ryo and Korin were to face him together, they would not be able to do much, let alone if A and Yugito Nii were to join him.
Using Ice Teleport and the Ice Lightning Chakra Flicker, Ryo reached the Cloud Village very quickly.
Before he entered, he disguised himself as a normal civilian with the transformation Jutsu, and hid his Chakra so he couldn't be detected.
This was the first step in Ryo's plan to get to Yugito Nii without having to face the entirety of the Hidden Cloud.
"Instead of digging behind the Rabbit through its nest, wait for it to get to you." Yugito Nii was, above all, a Hidden Cloud Ninja. She was bound to perform various tasks. Ryo's safest bet was to actually leave leave the Lightning Country and wait for her to fall in lap.
However, such a plan would not work without precise intelligence on her location and targets. Ryo picked the guise of a civilian, for that was the optimal way to get a Ninja to drop their guard. After all, there is no reason to think that a civilian could ever be a threat to Ninja.
With his ability to hide his Chakra, Ryo created a powerful illusion of vulnerability around himself. This was to allow him to approach Ninjas, and then use his powerful Genjutsu to get information out of them on Yugito Nii's next mission.
In this way, as he used his Chakra Hiding technique, Ryo managed to fool the Sensor Ninjas and the borders, and he successfully got into the village.
His next step was to find someone who would know of Yugito Nii's next mission. Someone of her caliber shouldn't be performing missions that are beneath A-Tier. For someone to have information on such a task, they need to be at least Elite Jonins.
As he roamed the village, Ryo was looking for someone of that caliber. Sure enough, after a 10 minutes search, he stumbled upon Dodai!
Ryo remembered that Dodai was part of the Division that had to face the revived 3rd Raikage during the 4th Shinobi World War along with Naruto and the others. He was also shown to be the auditor of the B candidates through the Double Lariat test.
Ryo's eyes shined, for this was the perfect target. He went into action by walking by Dodai's side, brushing into him ever so subtly while planting a very small ice flower to his coat.
Ryo then found himself a hotel to stay in, and at night, he teleported to Dodai's side through the Ice flower.
His move was too sudden, and Dodai immediately fell to his Genjutsu.
Ryo first stopped Dodai from moving, and began to read his memory with his clan's secret techniques.
By doing so, Ryo learned that the Raikage still practices the Double Lariat every single day, in the same location where the test for B was held. He thought about this, and decided to seize this opportunity.
The next day, Ryo controlled Dodai and made him go to the area where the 4th practices the Double Lariat with B. A few Minutes later, A arrived to the site.
Based on the memories he had already invaded, Ryo made Dodai act and talk as normally as possible. Therefore, A had no doubts.
After the training ended, Ryo got Dodai to chat with A normally. To not provoke the Raikage suspicions, he made sure to randomly ramble on as if nothing important was happing.
As the conversation went on, Yugito Nii was mentioned unintentionally, and Ryo took this opportunity asking: "Speaking of her, where did she go recently? I haven't seen her in a while, Raikage sama."
"She… went to escort a caravan to the Land of Rice Fields. Given how much time she had taken to get there, she should be on her way back now. Well, I'm going now, I'll see you at the office, Dodai!" After saying that, A turned around and left. (The Land of Rice Fields is the country that is to become the Sound Country, and the place where Orochimaru established the Hidden Sound.)
Ryo controlled Dodai to return home, and then using his Mangekyo Sharingan to fortify his Genjutsu, he convinced Dodai that all that happened was a normal conversation with the third.
Later on, Ryo controlled Dodai to get back to the test field for the Double Lariat. As the Genjutsu was lifted, Dodai felt nothing wrong besides some dizziness that made him very uncomfortable.
After taking a seat and resting for a while, the dizziness disappeared, and Dodai got back to his daily peacetime schedule.
As for Ryo, he immediately teleported to a teleportation barrier Mark he had left on the Lightning Country's borders. Then, he rushed towards the Land of Rice Fields; catching Yugito Nii on her way back from a mission was a rare opportunity that's not to be missed.
Ryo had to intercept her as quickly as possible, for the further she is from the Lightning Country, the better. He wouldn't want the Hidden Cloud to receive news of his "raid" too soon.
Just like A speculated, in the Land of Rice Fields, Yugito Nii had just finished her mission, and she set off with her team to get back to the Cloud Village.
After a decent distance, the sky gradually began to grow dim. With her task finished, Yugito was not in a hurry. She ordered her team to stop moving forward and to set a camp to stay for the night.
As the team lied down in the camp, a thunderbolt suddenly cut through the night and landed before them.
Ryo saw Yugito Nii and instantly recognized her, and so did she, for this was an old opponent.
Ryo was far beyond her in power, and more comparable to the 4th Raikage. Her along with the Nibi were no opponents of his.
At this thought, she became rather flustered, and then carefully asked: "Ryo Yamanaka, what brings you here?"
Yamanaka smiled and replied: "I came to borrow something from you."
"And what is that?"
"The Nibi's chakra!"
Immediately upon hearing Ryo's words, Yugito Ni entered the Tailed Coat Mode.
"Oh, it looks like you're not just going to give it to me? Then I will have to take it myself!"