This question is taken from the book "Differential Topology" by Allan Pollack. It is question 5 from section 1.3 and $X$ and $Y$ are manifolds. It is not for an assignment or a homework. I am just trying to self-teach differential topology.
First note that since $f$ is a local diffeomorphism, then for all $x \in X$ such that $f(x) = y \in Y$, there exist open sets $U_x \subset X$ and $V_x \subset Y$, such that both contain $x$ and $y$, respectively, and $f \colon U_x \to V_x$ is a diffeomorphism. Moreover, $f$ is an open map and $f(U_x)$ is open in $Y$. The open subset of $Y$ we are looking for would be the union of all possible $f(U_x)$. Set $ U = \bigcup_{x \in X} U_x$ and $V = \bigcup_{x \in X} f(U_x)$. Since $f$ is one-to-one then all such $f(U_x)$ are disjoint and, thus, $f \colon U \to V$ is bijective and by construction of $V$, $f^{-1}$ would be smooth on $V$. This would make $f$ a diffeomorphism.
I do not know if this approach is the correct, maybe not, but I would appreciate any possible feedback.