Is there a systematic approach that can be used to solve these two functional equations?
$$af(x) = f(bx), \quad\text{where }\ f\colon \mathbb{R}\to\mathbb{R} \tag{1}$$
$$ag(y) + ay = g(ay),\quad\text{where }\ g\colon\mathbb{R}\to\mathbb{R}\tag{2}$$
I pluged them into wolfram and got the result, but I am not sure how to do it systematically. Moreover, how to prove that the solutions are unique?
What I said in the comment is a common condition that must be satisfied to get a unique solution in a functional equation (that is, unique up to a finite number of parameters). However, in this case, it is not sufficient. Your condition in (1) is just not restrictive enough.
It is very easy to see by induction that if $a\ne 0, b \ne 0$, then for any $x$ and any $n \in \Bbb Z$, $$f(b^nx) = a^nf(x)$$ Suppose $b > 1$, and let $\varphi : (-b, -1] \cup [1,b) \to \Bbb R$ be an arbitary function. Define $$\mu: (0, \infty) \to \Bbb Z : x \mapsto \min\{n \in \Bbb Z \mid b^nx \ge 1\}$$ Note that for all $x > 0, 1 \le b^{\mu(x)}x < b$.
Then we can define a function $f : \Bbb R \to \Bbb R$ by $$f(x) = a^{-\mu(|x|)}\varphi(xb^{\mu(|x|)})$$ and $f(0) = 0$.
No matter what $\varphi$ we pick, we get a function that satisfies your equation. If we want $f$ to be continuous, then all we need to do is require that
There are still plenty of choices for $\varphi$ that satisfy these conditions. If $b < 1$, the only difference is that $\varphi$ is defined on $[-1, -b) \cup (b, 1]$ and $\mu(x) = \min\{n \in \Bbb Z \mid b^nx \le 1\}$.
I suspect the same is true for the second equation, but I haven't bothered to examine it closer.