The rate of change of a function $f(x)$ with respect to another function $g(x)$ at the point where $x=a$ simply means the ratio of the change in $f(x)$ caused by a small change$\big{(}$tending to $0$$\big{)}$ in $g(x)$ around $g(x)=g(a)$.
You can think of it as the slope of the tangent line to the graph plotted between $g(x)$ on the $X$-axis and $f(x)$ on the $Y$-axis at the point $\left(g(a),f(a)\right)$. Note that when $g(x)=x$, this rate of change simply becomes the derivative/rate of change or $f(x)$ w.r.t. $x$ at $\left(a,f(a)\right)$, which is what one is first introduced to when learning about derivatives.
P.S. Let me also prove why we divide by the derivatives of $f(x)$ and $g(x)$ at $x=a$(this is only applicable when $g'(a)\ne0$, see below) to find this rate of change$\bigg{(}$denoted by
$\frac{\mathrm df}{\mathrm dg}$$\bigg{)}$. It can also be thought of as an application of the chain rule.
$$\begin{align}\frac{\mathrm df}{\mathrm dg}&=\lim_{g(x)\to g(a)}\frac{f(x)-f(a)}{g(x)-g(a)}\\&=\lim_{x\to a}\frac{\frac{f(x)-f(a)}{x-a}}{\frac{g(x)-g(a)}{x-a}}\\&=\frac{\lim_{x\to a}\frac{f(x)-f(a)}{x-a}}{\lim_{x\to a}\frac{g(x)-g(a)}{x-a}}(\text{if }\lim_{x\to a}\frac{g(x)-g(a)}{x-a}=g'(a)\ne0)\\&=\frac{f'(a)}{g'(a)}\end{align}$$
If $g'(a)=0$, two cases arise:
$\textbf{Case 1, $f'(a)=0$:}$ In this case, $\frac{\mathrm df}{\mathrm dg}$ is given by:
$$\frac{\mathrm df}{\mathrm dg}=\lim_{x\to a}\frac{\frac{f(x)-f(a)}{x-a}}{\frac{g(x)-g(a)}{x-a}}$$
which is the same as
$$\frac{\mathrm df}{\mathrm dg}=\lim_{x\to a}\frac{f(x)-f(a)}{g(x)-g(a)}$$
Example, the rate of change of $\cos x$ w.r.t $x^2$ at $x=0$ is $\frac12$.
Note that the above limit may or may not exist. Example, the rate of change of $\cos x$ w.r.t $x^3$ at $x=0$ is not defined.
$\textbf{Case 2, $f'(a)\ne0$:}$ In this case, the derivative does not exist since one of the limits will be $+\infty$ and the other will be $-\infty$ as $\lim_{x\to0^+}\frac1{x}=+\infty$ and $\lim_{x\to0^-}\frac1{x}=-\infty$.
Example, the rate of change of $e^x$ w.r.t $\cos x$ at $x=0$ is not defined.