If $r\in\mathbb{N}$, we simply expand the integrand according to Newton's binomial theorem, and break up the integral of a sum into a sum of integrals, obtaining $$\int x^p(a+bx^q)^rdx=\sum_{k=0}^r{r\choose k\ }\cdot\frac{a^{r-k}\cdot b^k\cdot x^{1+p+kq}}{1+p+kq}$$ If $r\not\in\mathbb{N}$, $q=ab$ , and $p=a-1$, then $y=x^a$ is a viable substitution.
If $r\in\mathbb{N}$, we simply expand the integrand according to Newton's binomial theorem, and break up the integral of a sum into a sum of integrals, obtaining $$\int x^p(a+bx^q)^rdx=\sum_{k=0}^r{r\choose k\ }\cdot\frac{a^{r-k}\cdot b^k\cdot x^{1+p+kq}}{1+p+kq}$$ If $r\not\in\mathbb{N}$, $q=ab$ , and $p=a-1$, then $y=x^a$ is a viable substitution.