Your claimed result is not true, which probably explains why you're having trouble seeing it.
For simplicity I'll let $a = 0, b = 1$. Results for general $a$ and $b$ can be obtained by a linear transformation.
Let $X_1, \ldots, X_n$ be independent uniform $(0,1)$; let $Y$ be their minimum and let $X$ be their maximum. Then the probability that $X \in [x, x+\delta x]$ and $Y \in [y, y+\delta y]$, for some small $\delta x$ and $\delta y$, is
$$ n(n-1) (\delta x) (\delta y) (x-y)^{n-2} $$
since we have to choose which of $X_1, \ldots, X_n$ is the smallest and which is the largest; then we need the minimum and maximum to fall in the correct intervals; then finally we need everything else to fall in the interval of size $x-y$ in between. The joint density is therefore $f_{X,Y}(x,y) = n(n-1) (x-y)^{n-2}$.
Then the density of $Y$ can be obtained by integrating. Alternatively, $P(Y \ge y) = (1-y)^n$ and so $f_Y(y) = n(1-y)^{n-1}$.
The conditional density you seek is then
$$ f_{X|Y}(x|y) = {n(n-1) (x-y)^{n-2} \over n(1-y)^{n-1}} == {(n-1) (x-y)^{n-2} \over (1-y)^{n-1}}. $$
where of course we restrict to $x > y$.
For a numerical example, let $n = 5, y = 2/3$. Then we get $f_{X|Y}(x/y) = 4 (x-2/3)^3 / (1/3)^4 = 324 (x-2/3)^3$ on $2/3 \le x \le 1$. This is larger near $1$ than near $2/3$, which makes sense -- it's hard to squeeze a lot of points in a small interval!
The result you quote holds only when $n = 2$ -- if I have two IID uniform(0,1) random variables, then conditional on a choice of the minimum, the maximum is uniform on the interval between the minimum and 1. This is because we don't have to worry about fitting points between the minimum and the maximum, because there are $n - 2 = 0$ of them.
The case when $A$ and $B$ are independent you can do in your head. For the general dependent case, instead of finding $f_{XY}(x,y)$, you can compute $E[X|Y=y]$ by integrating $f_{AB}(a,b)$ over the line segments:
$$\{(a, y) : a\in [y,1]\}\cup \{(y,b) : b \in [y,1]\}$$
So:
$$ E[X|Y=y] = \frac{\int_{y}^1 af_{AB}(a,y)da + \int_{y}^1 bf_{AB}(y,b)dy}{\int_{y}^1f_{AB}(a,y)da + \int_{y}^1f_{AB}(y,b)dy} $$
If $A$ and $B$ are independent then $f_{AB}(a,b)=1$ for all $a,b \in [0,1]$ and the above integrals give $E[X|Y=y]=(1+y)/2$.
Of course, a more intuitive way in the independent case is to just observe that, given the min is $y$, the max is uniformly distributed over $[y,1]$, so its mean is the midpoint $(1+y)/2$.
Best Answer
You need not to find joint distribution. Note that $UV=XY$, so $$\mathbb E(UV)=\mathbb E(XY)=\mathbb E(X)\mathbb E(Y)=\frac14.$$