Let \( d \) be the distance the cyclist rides into the country in miles.
The time taken to ride into the country at an average speed of 10 miles per hour is given by:
\[ \text{Time riding} = \frac{d}{10} \]
The time taken to walk back at an average speed of 3 miles per hour is given by:
\[ \text{Time walking} = \frac{d}{3} \]
The total time for the trip (riding out and walking back) is given as 6.5 hours:
\[ \frac{d}{10} + \frac{d}{3} = 6.5 \]
To solve this equation, we first find a common denominator for the fractions. The least common multiple of 10 and 3 is 30. We can rewrite the equation as:
\[ \frac{3d}{30} + \frac{10d}{30} = 6.5 \]
Combining the terms on the left side:
\[ \frac{3d + 10d}{30} = 6.5 \]
\[ \frac{13d}{30} = 6.5 \]
Now, multiply both sides by 30 to eliminate the fraction:
\[ 13d = 6.5 \times 30 \]
Calculating \( 6.5 \times 30 \):
\[ 6.5 \times 30 = 195 \]
So we have:
\[ 13d = 195 \]
Now, divide both sides by 13 to solve for \( d \):
\[ d = \frac{195}{13} = 15 \]
Thus, the distance the cyclist goes into the country is:
\[ \boxed{15} \text{ miles} \]