Why does it take so long to boot and shut down my MacBook Air?
I agree with JWB's comment, more info on your computer and system would be helpful.

The "standard" Apple fix (when you call AppleCare) usually involves making a new user which is a useful thing to know how to do. Doing this will help you sort out where the problem is, at the system level or at the user level.

Go to the Apple menu and choose "System Preferences."

Click on "Users and Groups.

Unlock the screen to make changes (you'll need to type in your user password)

Before doing the next step click on your user name (current user) and then click the Login items tab to the right. Are there things loading on login that you don't recognize or you think might be causing the problem? If yes make note of what they are. For example, on my computer I have only two things that load on login: Fantastical and Alfred.

Hit the + (plus) under the list of users to make a new user.

Create a new standard user (make the user name and password easy). You can choose login options and set Automatic login to the new user if you want to test complete boot up speed but this isn't really necessary.

Close System Preferences.

Log out of your current user.

Log into the new user.

Shut down the computer.

Was it faster? How about on restart into the new user. Faster?

If starting up from the new user sped things up there's something loading or running at the level of your user account that's causing the problem.