The value of n must be 2, so that both sides of the equation have the same dimensions.
Explanation
The variables [tex]x, v[/tex] and [tex]a[/tex] have the dimensions of [tex][l], \frac{[l]}{[t]}[/tex] and [tex]\frac{[l]}{[t]^2}[/tex] respectively.
These variables are related by an equation that has the form [tex]v^n= 2ax[/tex]
So, the dimension of the left side ⇒ [tex](v^n)[/tex] ⇒ [tex](\frac{[l]}{[t]})^n[/tex]
and the dimension of the right side ⇒ [tex](2ax)[/tex] ⇒ [tex]\frac{[l]}{[t]^2} *[l]= \frac{[l]^2}{[t]^2} = (\frac{[l]}{[t]})^2[/tex]
If both sides of the equation have the same dimensions, so...
[tex](\frac{[l]}{[t]})^n = (\frac{[l]}{[t]})^2\\ \\ So.. n= 2[/tex]
So, the value of [tex]n[/tex] must be 2.