Question 324557
(x+3)^2-10(x+3)+24

Let's replace x+3 by A 
So, the given expression would transform to 

A^2 -10A + 24
Rewriting it as

A^2 - 6A -4A + 24
A(A-6) -4(A-6)
Taking A-6 as the common factor,
(A-6)(A-4)
Substituting A=x+3 back into the expression we get

(x+3-6)(x+3-4)
(x-3)(x-1) is the required factor.
==========================================================================
write a quadratic equation and answer the following: the shortest leg of a right triangle is two less than the hypotenuse. the hypotenuse is one longer than the longest leg.

Let the longest leg be x
So the hypotenuse is (x+1) {the hypotenuse is one longer than the longest leg}
And the shortest leg is (x+1)-2=x-1 {the shortest leg of a right triangle is two
                               less than the hypotenuse}
Using Pythagoras's theorem,
hypotenuse^2 = shorter leg^2 + longer leg^2
we get
(x+1)^2 = (x-1)^2 + x^2
Expanding the LHS and the RHS 
x^2 + 2x+ 1 = x^2 -2x+1 + x^2
Moving the Right hand side expression to Left hand side we get
x^2 + 2x+ 1 - (x^2 -2x+1 + x^2)= 0
grouping the like terms,
(x^2 - x^2 -x^2) + (2x + 2x ) + (1 -1)=0
-x^2 + 4x =0
-x(x-4)=0

which gives x=0 and x=4 as two possible solutions. But we cannot have a triangle with side of length 0. So discarding x=0 we get the other solution as x=4
Hence, the sides of the triangle are
The longest side=4
The shorter side=4-1=3
hypotenuse=4+1=5