There are a lot of pure algebraists here, but very few applied algebraists. So post the part of the question you do not understand.

Let p(x) = x^5 + 2x^4 + x^2 + x + 1.

*Is it the first step, where you have to find whether the given polynomial is square free?

You only need to find gcd of p(x) and p'(x). You should know Euclid's Algorithm for that.

*In the second step where you should find the Q matrix?

Find each row separately by reading off the polynomial coefficients of , with i varying from 0 to 4.

Thus you will get a 5 x 5 Q matrix.

*Finding a basis for null space of Q-I?

This is done by reducing Q-I to row echelon form. Then we can simply read the basis off the matrix.

*Once we get the basis, are you finding it difficult to convert it to polynomial form and get the factorization?

First convert each of the basis vector to polynomial form. Say the basis polynomials are , then for each s starting from s = 0 to p-1, find , which is the non-trivial factorization of p(x)

I did not compute the whole problem, because I find it painful to work out Q. If you tell me Q, we can work out the remaining details.