Find polynomial with some conditions

Let the polynomial be $f(x)=ax^3+bx^2+cx+d$. The second condition is easier to apply, because it implies $c=1$ and $d=0$.

Now let's apply the first condition. You know that $f(1)-1=0$, so $$ a+b+1-1=0 $$ On the other hand, $1$ must also be a root of the derivative of $g(x)=f(x)-1$. Hence $$ 3a+2b+1=0 $$ Thus $a=-1$ and $b=1$.

The polynomial is $f(x)=-x^3+x^2+x$.

Without derivatives: consider $g(x)=f(x)-1=ax^3+bx^2+x-1$. It should be divisible by $x-1$, so $g(1)=a+b+1-1=0$. Hence $b=-a$. Now we see that $$ g(x)=ax^3-ax^2+x-1=ax^2(x-1)+(x-1)=(x-1)(ax^2+1) $$ This should be divisible by $(x-1)^2$, yielding $a=-1$.