Phase rule and degrees of freedom
Let's do it step by step.


$C = 2$. The reason is that you have two components: $\ce{HBr}$ and $\ce{C4H6}$. The third compound, $\ce{BrC4H7}$, is simply a combination of both of them. Remember what is $C$: It's the minimal number of components needed to describe all phases in the system. Since $\ce{BrC4H7}$ can de described as $1\times\ce{HBr} + 1\times\ce{C4H6}$, it is not an independent component.
$P=1$ or $P=2$. It depends on how much the reactions has progressed. Basically, you have one phase on each side of the reaction. On the left, you have one gas phase that has a mixture of both $\ce{HBr}$ and $\ce{C4H6}$. On the right, you one one liquid (?) phase: $\ce{BrC4H7}$. So here are the possibilities:

The reaction has not started yet. All you have in the one gas phase. In that case, $P=1$ and $F=2-1+2=3$.
The reaction is going as written, but not completed yet. In this case not all gas is consumed yet, but liquid exists. Then, $P=2$ and $F=2-2+2=2$.
The reaction is finished. All gas is now liquid. Then we're back to $P=1$ and $F=2-1+2=3$.



So what happened in stage 2? Why did you lose a degree of freedom? Well, it depends on what what the driving force for the reaction. For example: Why did gaseous $\ce{HBr}$ and $\ce{C4H6}$ combine to form liquid $\ce{BrC4H7}$? Was it because of cooling or heating? In this case, the lost degree of freedom is $t$. Was it pressure? Then the lost degree of freedom is $P$.

$X$ is a bit problematic. There is not enough information given in the question. In my opinion, $X$ was fixed to begin with: I assume that once the reaction is complete, none of the reactants remain. Thus their ratio is fixed to 1:1 and $X$ is constrained. Had it not been the case, you would also get differing $P$ in stage three because you would have two phases, not one.