Reread Kakashi,Gai,Naruto,and Co's battle against Tobi in the war.When Kakashi figured out how Kamui works he basically repeated what Sakura said.So yes Sakura figured it out first,although it wasn't confirmed so Kakashi didn't take it as complete facts.
Also the reason why Sasuke didn't attempt figuring it out is because he didn't have time.He was actually cut off by Tobi,and Deidara while he was thinking about it,and they continued the battle.
It it was so easy to figure out,then surely Danzo's Elite members of Root would have figured it our,rather than spend a whole chapter analyzing it in battle,which eventually cost them their lives because they failed to figure it out.
Even Konan who had known Tobi for years,and spent years in advance planning on killing him in battle didn't fully know how it worked.
Don't take away from what's clearly an amazing intelligence feat from Sakura.