When Komal’s place is changed to 4 places to her left, her position is 10 from the left end, this means that Komal's original position should be 14 from the left. So this means Swati's position from left is 17. After Swati there are (40-17) 23 girls are sitting in the row. So when we see from right side, Swati is sitting after 23 girls, i.e. at number 24 from the right