In my book said that syntax is grammar outside the word but i don't understand why can you explain me
I take that to mean that morphology, grammar inside the word, and syntax, grammar outside the word, share the same concerns, methods, and assumptions, with the only difference being that the first deals with how morphemes go together to make words, and the second deals with how words go together to make phrases.
I don't think there is any truth to this at all. Language morphology has a primitive system and concerns mostly memorized facts, while syntax has a sophisticated system and concerns mostly innovation. The person who you quote probably knows very little about syntax.