Case $1$: $a,b\neq0$ and $\alpha,\beta\in\mathbb{R}^+$
Let $\begin{cases}t=\log_nx\\F(t)=f(x)\end{cases}$ , $n\in\mathbb{R}^+\setminus\{1\}$ ,
Then $F(t)=aF(t+\log_n\alpha)+bF(t+\log_n\beta)+g(n^t)$
$F(t)-aF(t+\log_n\alpha)-bF(t+\log_n\beta)=g(n^t)$
Let $\alpha=n^{k_1}$ and $\beta=n^{k_2}$ ,
Then $F(t)-aF(t+k_1)-bF(t+k_2)=g(n^t)$
If $k_1,k_2\in\mathbb{Z}$ , this is a difference equation
Its characteristic equation is $\lambda^{-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}-a\lambda^{\frac{k_1}{\gcd(|k_1|,|k_2|)}-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}-b\lambda^{\frac{k_2}{\gcd(|k_1|,|k_2|)}-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}=0$
So its general solution is of the form $F(t)=\sum\limits_{k=1}^{\max\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}\Theta_k(t)\lambda_k^t+F_p(t)~,$
where $\lambda_k$ are roots of $\lambda^{-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}-a\lambda^{\frac{k_1}{\gcd(|k_1|,|k_2|)}-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}-b\lambda^{\frac{k_2}{\gcd(|k_1|,|k_2|)}-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}=0$ and $\Theta_k(t)$ are arbitrary periodic functions with period $\gcd(|k_1|,|k_2|)$
i.e. $f(x)=\sum\limits_{k=1}^{\max\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}\Theta_k(\log_nx)\lambda_k^{\log_nx}+F_p(\log_nx)~,$
where $\lambda_k$ are roots of $\lambda^{-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}-a\lambda^{\frac{k_1}{\gcd(|k_1|,|k_2|)}-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}-b\lambda^{\frac{k_2}{\gcd(|k_1|,|k_2|)}-\min\left(\frac{k_1}{\gcd(|k_1|,|k_2|)},\frac{k_2}{\gcd(|k_1|,|k_2|)},~0\right)}=0$ and $\Theta_k(x)$ are arbitrary periodic functions with period $\gcd(|k_1|,|k_2|)$
$F_p(t)$ and $F_p(\log_nx)$ are their particular solution respectively. They can be found by method of undetermined coefficients if either of the form is obvious or by variation of parameter if both of the form are not obvious.
Other cases, i.e. either $k_1\notin\mathbb{Z}$ or $k_2\notin\mathbb{Z}$ , this is not a difference equation, even its form of general solution we have no concept on it
Case $2$: $a,b\neq0$ and either $\alpha\in\mathbb{R}^-$ or $\beta\in\mathbb{R}^-$
even its form of general solution we have no concept on it