125w3+64m3

Rewrite 125w3 as (5w)3.

(5w)3+64m3

Rewrite 64m3 as (4m)3.

(5w)3+(4m)3

Since both terms are perfect cubes, factor using the sum of cubes formula, a3+b3=(a+b)(a2-ab+b2) where a=5w and b=4m.

(5w+4m)((5w)2-(5w)(4m)+(4m)2)

Apply the product rule to 5w.

(5w+4m)(52w2-(5w)(4m)+(4m)2)

Raise 5 to the power of 2.

(5w+4m)(25w2-(5w)(4m)+(4m)2)

Multiply 5 by -1.

(5w+4m)(25w2-5w(4m)+(4m)2)

Rewrite using the commutative property of multiplication.

(5w+4m)(25w2-5⋅4(wm)+(4m)2)

Multiply -5 by 4.

(5w+4m)(25w2-20(wm)+(4m)2)

Remove parentheses.

(5w+4m)(25w2-20wm+(4m)2)

Apply the product rule to 4m.

(5w+4m)(25w2-20wm+42m2)

Raise 4 to the power of 2.

(5w+4m)(25w2-20wm+16m2)

(5w+4m)(25w2-20wm+16m2)

Factor 125w^3+64m^3