As soon as you have control, enter the mansion through the main doors. Jump up the stairs in the main lobby and look at the three doors to your left. You will want to enter the middle door here, so do that and you will be in the library. Whenever you step forward in this room, some books will shoot out from the shelves pretty quickly. There’s nothing you can do about these books, so try to rush through this little section really quickly. Turn the corner and at the end, you will notice that three books are sticking out of the shelves now.
Hitting these books will cause them to recede into their shelf, but only if done in the proper order. If you hit the wrong book, then a Bookend will fly out to hit you for relatively minor damage. Since there’s only three books, it’s not too hard to do some trial and error to find out the solution. Should you wish to not be spoiled on this, click the spoiler below for the answer:
The order in which to hit the books is 2-3-1.
The bookshelf will move if you do it as above, revealing a door. Go through the door to find your star. Note that there is an alternate way to get this star without doing the little book puzzle. On the second floor, go through the door on the far left to find yourself on a balcony. Across from you is the spot with the star, but the jump is a little tricky. You will want to perform a Double Jump, but for the second jump, hold the left stick to the left. While you’re in the air during the second jump, pull the stick in the opposite direction enough so you can perform a kick in the air instead of the dive. That should be enough to get you to the star. There should also be just barely enough room to perform a Triple Jump.