Consider for example the PDE $$ \begin{cases} u_{tt}(x,t) - \Delta u(x,t) = 0 , & (x,t) \in \mathbb R^2,\\ u(x,0) = g(x),\\ u_{t}(x,t) = h(x), \end{cases} $$ which solution we know can be written with the formula $$ (*) \qquad \qquad 2u(x,t) = g(x+t) - g(x-t) + \int_{x-t}^{x+t}h. $$
But if a coefficient $c$ appears in the wave equation as in $$u_{tt} - c^2 \Delta u= 0,$$ I heard that one can obtain the corresponding formula $$ 2u(x,t) = g(x+ct) - g(x-ct) + \dfrac{1}{c} \int_{x-ct}^{x+ct} h $$ directly from $(*)$, without doing back again all calculations, with dimensional analysis. How does this work?
This follows from the rule:
Now $x$ has dimension $L$ (length - for example meters) and $t$ has dimension T (time - for example seconds). $c$ has dimensions of $L/T$ (length over time - for example in meters per second) so $ct$ has dimensions of length. Since $c$ is the only dimension-full constant in the problem we need
$$x - t \to x - ct$$
in order for the units of the two terms to match.
Another way to derive this is to start with
$$u_{tt} = c^2\Delta u$$
and define a new $t$ coordinate by $t' = ct$. Then
$$u_{t't'} = \Delta u$$
Now we can use your solution for the equation above to find
$$2u = g(x-t') + \ldots = g(x-ct) + \ldots$$