Answer
$2$.
Work Step by Step
The given expression is
$(x-?)(x-12)=x^2-14x+24$
Factor the right hand side of the equation.
$=x^2-14x+24$
$=x^2-12x-2x+24$
$=x(x-12)-2(x-12)$
$=(x-2)(x-12)$
Plug into the given expression.
$(x-?)(x-12)=(x-2)(x-12)$
By comparing both sides, the question mark is $2$.