Perhaps, it helps to understand the problem if you take a look at the following figure:
Here, there are $500$$(a,b)$ dots and the corresponding $(X,Y)$ dots...
The task is (may be) to describe the function below which all the $(X,Y)$ dots lie.
If the shape of the upper bound of the right hand side dot diagram is the question then we may compute the maximum of $Y$ if $X$ is fixed. If $X$ is fixed then $a=\frac X{1-b}$. Then
$$Y(b)=b-\frac{bX}{1-b}.\tag 1$$
Having fixed an $X$ then $Y$ is a function of $b$. Take the derivative of the function above with respect to $b$. Now, we have to solve the following equation in $b$.
$$1-\frac{X}{(1-b)^2}=0.$$
The solutions are
$$b=1\pm\sqrt X.$$
Substitute $b=1-\sqrt X$ (belonging to the maximum of $Y$) to (1). If $X$ is given then we get
$$Y=1-2\sqrt X+X,$$
the shape of which function is shown below:
Note that the randomeity, as it is described in the OP, has nothing to do with the actual question:
HINT
Perhaps, it helps to understand the problem if you take a look at the following figure:
Here, there are $500$ $(a,b)$ dots and the corresponding $(X,Y)$ dots... The task is (may be) to describe the function below which all the $(X,Y)$ dots lie.
If the shape of the upper bound of the right hand side dot diagram is the question then we may compute the maximum of $Y$ if $X$ is fixed. If $X$ is fixed then $a=\frac X{1-b}$. Then
$$Y(b)=b-\frac{bX}{1-b}.\tag 1$$
Having fixed an $X$ then $Y$ is a function of $b$. Take the derivative of the function above with respect to $b$. Now, we have to solve the following equation in $b$.
$$1-\frac{X}{(1-b)^2}=0.$$
The solutions are
$$b=1\pm\sqrt X.$$
Substitute $b=1-\sqrt X$ (belonging to the maximum of $Y$) to (1). If $X$ is given then we get
$$Y=1-2\sqrt X+X,$$
the shape of which function is shown below:
Note that the randomeity, as it is described in the OP, has nothing to do with the actual question:
Given the transformation
$$X=a(1-b), \ Y=b(1-a)$$
what is the image of the unite square.