Practice math problems out of many books. For math classes, don’t do problems just out of one book. Do every single problem out of three to four books, and ask your TA about any problems you don’t understand. Also, don’t look at the solution manual too often. Attempt math problems eight or more times, and then if you absolutely have no idea how to do it, check the solutions.