Who first observed another planet rotating? We knew the earth rotates, but the moon is tidally locked.

To tell that another planet is rotating, you have to be able to distinguish its surface (I guess?). Who first did this?
Mercury's surface was virtually unknown until Mariner 10 flew by and Venus is covered in clouds. Of the terrestrial planets, that leaves Mars.

It was likely Christiaan Huygens in November 1659 who first realised Mars was rotating when he tried to map it. His estimate of roughly 24 hours was fairly close.

I believe Galileo's earlier observations on Jupiter were with a telescope not powerful enough to resolve smaller 'surface' features (like the Great Red Spot), which may have either proven that Jupiter rotates, or at least that something on the surface is moving across it.