I'll be honest. This kind of problem can be quite tedious. Thankfully, there is not a coefficient on x3, or it would be still more tedious. The basic idea is that, if rational solutions exist, then they will be positive or negative factors of the constant term (in this case 8). So you just try them until you find one that works. Happily, synthetic division can make the process a little easier. Not only can it quickly tell you if a number is a zero of the function, but it can also give you a polynomial factor with a lower degree.
The positive and negative factors of 8 are ±1, ±2, ±4, and ±8. So, if there are rational solutions, they will be from these 8 numbers. So I'm going to start trying numbers.
Could x = 1?
1 | | 1 1 -10 8
¯¯¯ | 1 2 -8
¦ ¯1¯¯¯¯2¯¯¯¯-8¯¯¦¯0¯¯¯
As we can see, the remainder is 0, which means that (x - 1) is a factor, and P(1) = 0. I promise you, I totally didn't know that 1 would work. I lucked out.
So we see that 1 is a solution, and we also have the quotient from dividing by (x - 1): x2 + 2x - 8.
This is factorable, and is equal to (x - 2)(x + 4). The zeroes of this factor pair are 2 and -4 (from setting them equal to 0: x - 2 = 0 and x + 4 = 0).
So the zeros are 1, 2, and -4, and the factoring is (x - 1)(x - 2)(x + 4).
If you have further questions, such as how to do synthetic division and why that's a good idea in this context, let me know in the comments.

John B.
10/21/19
Almaz S.
Ohh, okay. Thank you so much for helping me out! I really apreciate it.10/21/19
Almaz S.
Thank you so much! I had no idea that we could solve it like that. I was just trying to solve it by factoring, but it didn't work. Now, I have only one question. So basicly, you just have to try to divide using synthetic divison by each factor of 8 untill you'll have 0 as a remainder, right?10/21/19