While shopping for clothes, Tracy spent $50 less than 3 times what Daniel spent. Tracy spent $40. Let x represent how much Daniel spent?