How do scientists know the sun rotates 25.38 earth days?
Because the Earth is solid, when the Earth rotates, it rotates all together. The Sun, however, is a plasma, not a solid. So the various parts of the Sun don’t have to stay together, and they don’t. The “equator” of the Sun rotates in 25 days, but the areas near the poles rotate in about 33 days, and the mid-latitudes rotate at an in-between speed.