Assuming you are asking the question in the title (and assuming that you can somehow use this answer written in english):
I suspect the issue here is that the engine responsible for simplifying symbolic expressions prefers the denominator to be "monic" and that it orders the variables alphabetically. Hence, it wants the coefficient in front of "k" to be 1 in the denominator and not the one in front of "n". If you change your example to
```
var("n,p")
-(n+1)/(p-n-1)
```
you see that it rewrites it in the form you desire (albeit with a p in the place of k).