You'd has two meanings, which are you had and you would. 1 We use you had with better and you would with rather. You had is usually used for suggestion. Example: You'd better (you had better) avoid the stalls on the street. So you'd means you had in your first sentence. Your second sentence is grammatically wrong. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.