Given a uniformly distributed PDF $$ f_{X,Y}(x,y)=\frac{1}{4ah} $$ With the support$$S=\{(x,y): -a+bx<y<a+bx,\ \ -h<x<h\} $$ for some constants $a,b,h$
Then for $-h<x<h$ $$ f_X(x)=\int^{a+bx}_{-a+bx}\frac{1}{4ah}dy=\frac{1}{2h} $$ and $$ f_Y(y)=\int^{h}_{-h}\frac{1}{4ah}dx=\frac{1}{2a} $$
So $f_{X,Y}(x,y)=f_X(x)f_Y(y)$ implying independence
Now, the solution on the book also attempted to find the correlation coefficient $\rho$
Since the conditional expectation is linear in $X$: $$E(Y|X=x)=bx$$ $$ \text{Var}(Y|X=x)=\frac{a^2}{3} $$
We use the theorem for linear conditional expectation:
$$ E(Y|X=x)=\mu_Y + \rho \frac{\sigma_Y}{\sigma_X}(x-\mu_X) $$ and $$ E(\text{Var}(Y|X=x))=\sigma^2_Y(1-\rho^2) $$ where $\mu, \sigma$ denote the mean and variance respectively
From the theorem, $ b=\rho\frac{\sigma_Y}{\sigma_X} $ and $\frac{a^2}{3}(\sigma_Y^2(1-\rho^2))$ Which gives $$ \rho=\frac{bh}{\sqrt{a^2+b^2h^2}} $$
$\rho$ is not necessarily $0$ so we can choose the parameters $b,h$ such that $\rho≠0$ implying dependence between $X,Y$.

Pay closer attention to the support.
Since for any given $x$, the values of $y$ are bounded by functions of $x$, therefore you should anticipate dependence.
Firstly, the domain of $S=\{(x,y): -a+bx<y<a+bx\,, -h<x<h\}$ means that
$$\begin{align}f_X(x) &=\int_{-a+bx}^{a+bx}\dfrac{\mathbf 1_{-h<x<h}}{4ha}\,\mathrm d y\\[2ex]&=\dfrac{1}{2h}~\mathbf 1_{-h<x<h}\end{align}$$
[Note: because we want the marginal of $x$ we 'integrate out' $y$ over where it is supported relative to $x$.]
Nextly, by rewriting the domain $S=\{(x,y): (y-a)/b<x<(y+a)/b\,, -a-bh<y<a+bh\}$, we likewise have:
$$\begin{align}f_{Y}(y) &=\int_{(y-a)/b}^{(y+a)/b}\dfrac{\mathbf 1_{-(a+bh)<y<(a+bh)}}{4ha}\,\mathrm d x\\&=\dfrac{1}{2bh}\mathbf 1_{-(a+bh)<y<(a+bh)}\end{align}$$
So $f_X(x)f_Y(y) = \dfrac{1}{4bh^2}\mathbf 1_{-h<x<h, -(a+bh)<y<(a+bh)}$ which does not equal to the joint p.d. function.