I think you are confusing the parameters $k$ (length of raw messages) and $M$ (how many messages = how many codewords), which are related by $M=2^k$. Here $M=8$, $k=3$.
Now, the matrix $G$ allows to generate the codewords as $ v^{1\times n} = u^{1\times k} \, G^{k\times n}$, (I'm denoting the sizes as superscripts).
Then $G$ have $k$ rows (not $M$ ), each of size $n$.
The recommended way of thinking of the rows $G$ is as a basis of the codebook. All codevectors $v$ are a linear combination of those rows. If you are given the codebook with the original messages, then to find $G$ you simply look for the "canonical" inputs $u_1=(1,0, \cdots 0)$ $u_2=(0, 1, \cdots 0) \cdots$ , the resulting codewords msut be the rows of $G$.
If instead, you are given the equations (as here) it's more easy to build it by hand. Given that you evidently have done your effort, I'll write that for you:
$$(x_1, x_2, x_3, x_4, x_5, x_6) = \pmatrix{
1 & 0 & 0 & 1 & 1 & \times\\
0 & 1 & 0 & 1 & 0 & \times\\
0 & 0 & 1 & 1 & 1 & \times
} (x_1, x_2, x_3, x_4) $$
I left the last column for you. Check, by evaluating the matrix product, that the codeword elements are ok, and find the last column (using the equation for $x_6$)
BTW: $G$ has the form $[I|P]$ only when the code is systematic - which is the case here, but not always.
Some of this is going to depend on what definitions you are using. Hill, A First Course in Coding Theory, page 49, says a generator matrix for a linear code is a matrix whose rows form a basis for the code. With that definition, if you permute the rows of a generator matrix, you do not affect the code, but if you permute the columns then in general you will get a different code.
But you also use the word, "equivalent," in your question. Two codes can be different, but still be equivalent. Indeed, on the next page of Hill, Theorem 5.4 asserts that whether you permute the rows or the columns, you still get an equivalent code.
Best Answer
Once you have $H$, to find $G$ you need to find a set of $k$ rows of length $n$ that are LI and orthogonal to the rows of $H$.
In a simple case like this, it could be done by trying, eg:
$$ G= \begin{bmatrix} 1 & 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 1 \\ \end{bmatrix}$$
A more general and systematic way is to try to find an equivalent code (same codebook, different mapping) by doing elementary operations with the rows of $H$, to put it in systematic form: $H=( I | P´)$ and then $G=( P | I)$ fits the bill.
In this case, we cannot do that manipulating the rows alone. We can resort to an aditional trick: you are also allowed to permute some columns , to bring it to systematic form, but then at the end un-permute the rows in the resulting $G$.
So, let's permute columns 2 and 4 to get the modified parity matrix
$$\begin{bmatrix} 1 & 0 & 1 & 1 & 0 \\ 0 & 1 & 0 & 0 & 1 \\ \end{bmatrix}=[I | P'] $$
and the modified generator matrix is
$$[P | I] =\begin{bmatrix} 1 & 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 & 1 \\ \end{bmatrix} $$
and after permuting columns 2 and 4 we get
$$ G = \begin{bmatrix} 1 & 0 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 1 \end{bmatrix} $$
You can (you should) check that the rows are indeed LI and orthogonal to the rows of $H$.