I need some help how to solve these equations for $x$. I think I have to use logarithms but still not sure how to do it and would be really grateful if someone could explain me.

$x^2 \cdot 2^{x + 1} +2 ^{\lvert x - 3\rvert + 2}
 = x^2 \cdot 2^{\lvert x - 3\rvert + 4} + 2^{x - 1}$

$(x^2 - 7x + 5)^{x^2-2x-15} = 1$