Has the following proof on finite groups a flaw or is it valid and I do not see it In the book Theory of Finite Groups by Kurzweil and Stellmacher we find on page 5 the following statement and proof:

A nonempty finite subset $U$ of $G$ is a subgroup if for all $x,y \in U$ also $xy$ is in $U$.
Proof. For $x \in U$ the mapping $\varphi : u \mapsto ux$ from $U$ to $U$ is injective and thus also surjective since $U$ is finite. If follows that $1 = x^{\varphi^{-1}} \in U$ and $x^{-1} = 1^{\varphi^{-1}} \in U$. $\square$

I have no doubt about the statement, but I guess there is a subtle inaccuracy in its proof. How do we know that the inverse image of $x$ by $\varphi^{-1}$ is $1$. Certainly as $\varphi$ is bijective on $U$ we have $x^{\varphi^{-1}} \in U$. 

So why $x^{\varphi^{-1}} = 1$?

Remark: For me a "correct" proof would go like this: Consider $\varphi : G \to G$ with $g \mapsto gx$, then this map is injective and as $\varphi(1) = x$ 
we have $x^{\varphi^{-1}} = 1$. Furthermore the restriction to $U$ is also injective and therefore surjective on $U$ as its image lies always in $U$, and this gives $1 \in U$ as $1$ must be its unique inverse image. This proof considers the map on the whole of $G$ first, but the above mentioned proof considers a map $U \to U$ from first principles, and I see no way to derive from that $x^{\varphi^{-1}} = 1$; for example imagine that an extension on $G$ is not injective, then an inverse image of $x$ in this extension mapping might be $1$, and another one might be the element in $U$ different from $1$.
 A: We know that $e:=x^{\phi^{-1}}\in U$ is an element of $U$ with the property $ex=e^\phi=x$. As $G$ is a group, we conclude that $e=1$.
A: Well you know that by definition $x^{\varphi^{-1}}x=(x^{\varphi^{-1}})^\varphi=x$ in the group $G$. This clearly implies $x^{\varphi^{-1}}=1$. I wouldn't call this an inaccuracy, it's just not doing all the small details, which is extremely frequent in math books...
A: Always remember that you're working in a group $G$, so whenever necessary, we can bounce our computations up to the group itself.
Sketch:


*

*$\varphi$ is injective because if $ux=vx$, then applying $x^{-1}$ from $G$ gives you $u=v$.

*An injective map from a finite set to itself must be surjective because there are only finitely many elements (and you run out of elements otherwise).  Therefore, $\varphi$ is surjective.

*Since $\varphi$ is surjective, there is some $w$ in $U$ so that $\varphi(w)=x$ (this happens because $x\in U$ and $\varphi$ is surjective).

*Observe that this means $wx=x$, so applying $x^{-1}$ from $G$ gives you $w=1$.  Therefore, $U$ must contain the identity of $G$.

*Moreover, we see that since $\varphi(1)=x$, $\varphi^{-1}(x)=w=1$. 
A: The proof is valid:
$1=(1^{\varphi^{-1}})^\varphi=1^{\varphi^{-1}}x$ so $1^{\varphi^{-1}}=x^{-1}$
Alternatively, you can check $\varphi^{-1}:u\mapsto ux^{-1}$ so $1^{\varphi^{-1}}=x^{-1}$
