can -5x and -5x^2 be like terms

No, -5x and -5x^2 cannot be considered like terms because they have different exponents. Like terms must have the same variables raised to the same power.