TITLE: existence of a connected set with given connected projections.
QUESTION [10 upvotes]: Suppose A and B are compact connected sets in the XY plane and XZ plane respectively in R^3. Suppose further that the the range of x-values taken by A and B are the same (i.e, projections of A and B onto the x-axis are the same closed interval). Is there always a connected set in R^3 whose projections onto XY and XZ planes are A and B respectively?

REPLY [6 votes]: The answer is yes.
Let $\alpha,\beta:[0,1]\to[0,1]\times \mathbb R$ be two paths;
$\alpha(t)=\left(\alpha_1(t),\alpha_2(t)\right)$ and $\beta(t)=\left(\beta_1(t),\beta_2(t)\right)$.
Assume that $\alpha_1(0)=\beta_1(0)=0$, $\alpha_1(1)=\beta_1(1)=1$.

Claim. The points $a=\left(0,\alpha_2(0),\beta_2(0)\right)$ and  $b=\left(1,\alpha_2(1),\beta_2(1)\right)$ lie in the same connected coponent of the set $\Sigma\subset \mathbb R^3$ formed by points of the following type $ \left(\alpha_1(t),\alpha_2(t),\beta_2(\tau)\right)$ such that $\alpha_1(t)=\beta_1(\tau)$.

Proof. Note that for generic smooth choice of $\alpha$ and $\beta$ the set $\Sigma$ is a smooth 1-dimensional manifold which might be not connected, but it has only two boundary points in $a$ and $b$.
Thus, in this case one can connect these points by a curve.
The general case can be done by approximation. $\square$
The rest is easy: one can approximate $A$ and $B$ by path-connected sets $A'$ and $B'$ with the same property. 
Thus one can present $A'$ and $B'$ as a union of curves $\alpha$ and $\beta$ with the above property. 
Moreover we can assume that the ends of $\alpha$ and $\beta$ are fixed (i.e. $a$ and $b$ are fixed).
For each pair $(\alpha,\beta)$, choose the connected component of $a$ in $\Sigma$ and take the union of all of them.