Initially, Ribi sits at the 6th position from the left and Riya sits at the 5th position from the right.
After exchanging positions, Ribi becomes 10th from the left. This means Ribi is now at Riya's original position.
Since Ribi's new position (10th from left) is the same as Riya's original position (5th from right), we can find the total number of girls in the row.
When a position is nth from the left and mth from the right:
Total positions =n+m−1
Total positions =10+5−1=14
After the exchange, Riya is now at Ribi's original position, which was 6th from the left.
To find Riya's position from the right:
Position from right =Total positions−Position from left+1
Position from right =14−6+1
Position from right =9
Therefore, Riya's new position from the right end is 9th.