Step 1: Compute \(A^2\).
Given,
\[
A=
\begin{bmatrix}
x & 0\\
1 & 1
\end{bmatrix}
\]
Now,
\[
A^2=A\cdot A
\]
\[
A^2=
\begin{bmatrix}
x & 0\\
1 & 1
\end{bmatrix}
\begin{bmatrix}
x & 0\\
1 & 1
\end{bmatrix}
\]
Multiplying,
\[
A^2=
\begin{bmatrix}
x^2 & 0\\
x+1 & 1
\end{bmatrix}
\]
Step 2: Compute \(A^3\).
Now,
\[
A^3=A^2\cdot A
\]
\[
A^3=
\begin{bmatrix}
x^2 & 0\\
x+1 & 1
\end{bmatrix}
\begin{bmatrix}
x & 0\\
1 & 1
\end{bmatrix}
\]
Multiplying,
\[
A^3=
\begin{bmatrix}
x^3 & 0\\
x^2+x+1 & 1
\end{bmatrix}
\]
Step 3: Compare \(A^3\) with \(B\).
Given,
\[
A^3=B=
\begin{bmatrix}
8 & 0\\
7 & 1
\end{bmatrix}
\]
Comparing corresponding entries,
\[
x^3=8
\]
Thus,
\[
x=2
\]
Now check the second entry:
\[
x^2+x+1=7
\]
Substituting \(x=2\),
\[
2^2+2+1=4+2+1
\]
\[
=7
\]
Hence, the value satisfies both conditions.
Step 4: Final conclusion.
Therefore,
\[
\boxed{2}
\]