$G$ finite group, $H\leq G$ such that $C_G(x)\subseteq H\quad\forall x\in H$ such that $p\mid o(x)$ Suppose $G$ is a finite group and fix a prime $p$. 
Let $H\leq G$ have the property that $C_G(x)\subseteq H$ whenever $x$ is an element of $H$ whose order is $p^\alpha, \alpha>0$ an integer. Then prove that $p$ cannot divide both $|H|$ and $|G:H|$.
I'm asking you to lend me an hand since it seems I'm stuck on the problem.
Thank you very much.
 A: If $p$ does not divide $H$, then the condition is satisfied vacuously, but the conclusion holds so there is nothing to do. So assume that $p|H$. 
Let $P$ be a Sylow $p$-subgroup of $H$. If $P$ is not a Sylow $p$-subgroup of $G$, then there exists a subgroup $Q$ of $G$ that contains $P$, with $[Q:P]=p$. Now consider $Z(Q)$, which is nontrivial. If $Z(Q)\subseteq P\neq\{1\}$, then letting $x\in Z(Q)$, $x\neq 1$, gives an element of $P$ (hence of $H$) whose centralizer contains $Q$ (since $x\in Z(Q)$), so $Q\subseteq C_G(x)\subseteq H$, contradicting the fact that $P$ is a Sylow $p$-subgroup of $H$ and $Q$ is of order $p|P|$. Therefore, $Z(Q)\not\subseteq P = \{1\}$.
But since $Z(Q)$ is nontrivial, and $P$ is maximal in $Q$, this implies that $Q=PZ(Q)$. Therefore, if $x\in Z(P)$, then every element of $Q$ centralizes $x$; that is, $Z(P)=Z(Q)\cap P$. Since $P$ is a nontrivial $p$-group, $Z(P)\neq \{1\}$, so we can pick $x\in Z(P)\subseteq Z(Q)$, $x\neq 1$, and again we have $Q \subseteq C_G(x)\subseteq H$, contradicting the assumption that $P$ is a Sylow $p$-subgroup of $H$ and that $Q$ is a $p$-group properly containing $P$.
In either case, the assumption that $P$ is not a Sylow $p$-subgroup of $G$ leads to a contradiction, so if $p$ divides $|H|$, then the highest power of $p$ that divides $|H|$ equals the highest power of $p$ that divides $|G|$, so $|G:H|$ is not a multiple of $p$.
A: Here is what I was suggesting in my comment:
The problem is vacuous, as Arturo mentions, if $p$ does not divide $|H|$.  So suppose it does, and let $P$ be a Sylow p-subgroup of $G$ intersecting $H$ non-trivially.  Let $x\in P\cap H$ be a non-trivial element of the intersection.  Then we have, by the hypothesis,
$$ Z(P)\subset C_P(x)\subset C_G(x)\subset H.$$
Since $Z(P)$ is non-trivial, take a non-trivial $y\in Z(P)$; then again, since $Z(P)\subset H$, we have
$$ P\subset C_P(y)\subset C_G(y)\subset H,$$
and so $H$ contains a Sylow p-subgroup of $G$, implying that $[G:H]$ is not divisible by $p$.
