Divide (6k^2m-12k^3m^2+9m^3)/(2(km^2))