Gibran Hamdan threw three of his four touchdown passes in the final 16 minutes to help the Hoosiers rally from a 19-point deficit to beat the 23rd-ranked Badgers 32-29 in Bloomington.