Editing formula for finding Marshallian Demand with Cobb-Douglas utility function Suppose a utility function $u=x_1^ax_2^b$ with $a+b=1$. The following formula finds the values for $x$:

$x_1 = \frac{am}{p_1}\\
x_2 = \frac{bm}{p_2}$  

But what if the utility function looks like $u=cx_1^adx_2^b$ so has additional factors bevore $x_i$? Can the formula above be edited accordingly?
$u=cx_1^adx_2^b$ is equivalent to $u=(cd)x_1^ax_2^b$
the values of $c$ and $d$ do not impact the optimal bundles. I'll provide complete working on your other question (Marshallian Demand for Cobb-Douglas).