This equation in simplest form would be n^2+5n+2r
To get this you would do so:
3r+n^2-r+5n
3r-r+n^2+5n REARRANGE so it is easier to simplify
2r+n^2+5n SUBTRACT the r from 3r
n^2+5n+2r REARRANGE again so it is in the correct order (numerical + alphabetical order)