Explanation:
there is no common method, as there are things in various forms that can be multiplied to each other.
you need to assemble experience in multiplying various forms of terms and expressions to remember, what you can aim for.
there are some basic principles like
(a² - b²) = (a + b)(a - b)
(a³ - b³) = (a - b)(a² + ab + b²)
a² + 2ab + b² = (a + b)² = (a + b)(a + b)
and, and, and
also, often you need to try to add or remove some terms to make an expression a perfect multiplication result.
like
x + xy + y = 0
x(1 + y) + y = 0
x(1 + y) + y + 1 = 0 + 1
x(1 + y) + (1 + y) = 1
(1 + y)(x + 1) = 1
or you need to split some things up to create perfect multiplications.
like
x³ + x² = 12
x³ + x² - 12 = 0
x³ + x² - 8 - 4 = 0
x³ + x² - 2³ - 2² = 0
(x³ - 2³) + (x² - 2²) = 0
remember, what we just listed above :
(x - 2)(x² + 2x + 4) + (x - 2)(x + 2) = 0
(x - 2)(x² + 2x + 4 + x + 2) = 0
(x - 2)(x² + 3x + 6) = 0
and so on.
there are many functions like trigonometric functions (sine, cosine, ...), logarithms, ...
there are not just multiplications and exponents.
sure, it is more standardized, when we are only dealing with a squared function like
4x² - 12x + 9
which is easy to see is the same as
(2x - 3)²
or more interesting
6x² - 23x + 20
which would be
(2x - 5)(3x - 4)
and we can get such things only by starting in general by saying this is
(ax + b)(cx + d)
multiply this out and find the factors of in this case 6, 23 and 20 and try the combinations.
so, long story short, there is no general method, formula or something like this. you need to get a feeling what approach could work in a given situation.