Let $a,b,c$ be pairwise coprime integers. Let $\mathcal{P}_1$, $\mathcal{P}_2$ be two sets of prime numbers with positive relative density. We can assume that the primes in each $\mathcal{P}_i$ do not divide $abc$. Let $S_i$ be the set of numbers whose prime factors all come from $\mathcal{P}_i$. Can one count the number of solutions to the equation

$$\displaystyle ax + by = c$$

with $x \in S_1, y \in S_2$ and $\max\{|x|, |y|\} < T$?

I am most interested in the case when $\mathcal{P}_i$ are primes which split (and are unramified) over quadratic fields $K_i$ for $i = 1,2$.