Let $Y\_1$, $Y\_2$ be two complex smooth projective surfaces, are there some restrictions for $Y\_1$ and $Y\_2$ to be embedded in a common smooth projective threefold? 


The first thought is to use Lefschetz hyperplane theorem, is there any example that $Y\_1$ and $Y\_2$ have same first Betti number but can't be embedded in a common threefold? 



Condition for two surfaces to not live inside a common threefold
No, there are no restrictions. Here is a construction of such a threefold $X$. [I assume that the $Y\_i$ are connected, and I look for a connected $X$.]


For $i\in\{1,2\}$, let $C\_i$ be the cone over $Y\_i$ in some projective embedding of $Y\_i$. Let $f\_i:C'\_i\to C\_i$ be the blow-up of the vertex of $C\_i$, with exceptional divisor isomorphic to $Y\_i$. Choosing a projective embedding of $C\_i$, and then a generic projection to $\mathbb{P}^3$, we obtain a finite morphism $g\_i:C\_i\to\mathbb{P}^3$. 


Composing $g\_1$ with a generic element of $\textrm{PGL}\_4(\mathbb{C})$, we may assume that the image by $g\_i$ of the vertex of $C\_i$ is included in the locus above which $g\_{3-i}$ is étale (for $i\in\{1,2\}$).


Consider the fiber product $(C'\_1)\times\_{\mathbb{P}^3}(C'\_2)$ of the morphisms $g\_i\circ f\_i$. It contains $\textrm{deg}(g\_1)$ copies of $Y\_2$ and $\textrm{deg}(g\_2)$ copies of $Y\_1$, and it is smooth along these subvarieties. Using that $C\_1'$ and $C'\_2$ are irreducible, it is easily verified that one can choose one copy of $Y\_1$ and one copy of $Y\_2$ belonging to the same connected component $Z$ of the smooth locus of $(C'\_1)\times\_{\mathbb{P}^3}(C'\_2)$. We let $X$ be a smooth projective compactification of $Z$.


