JSFiddle - React, Tailwind, and code Playground

HTML

Professor is wrong.  

Let's use "asymptotically faster" algorithm to compute (a + b)^2, a^2 and b^2. From those values we can compute a*b in O(n) time, using addition, subtraction and division by 2:  
a*b = ((a + b)^2 - a^2 - b^2) / 2

So, if "asymptotically faster" square-computing algorithm has time complexity O(f(n)), our algorithm to multiply different numbers has complexity O(3*f(n) + 4*n), equal to O(f(n)).