Wow, tough question. It really depends on what kind of traveller you are.
To help you decide, we suggest having a read of our EPIC guide to the best hostels in Amsterdam. It includes insider tips and tricks.
br>
Both cities have an epic nightlife, so there is no doubt about that. As a budget traveler, you will enjoy Budapest more as it is much cheaper than Amsterdam.
Amsterdam on the other hand has the coffee shops, the red-light district to explore and this ambiance of freedom and liberty. Personally, I would check the prices of transport to get there. When you are backpacking Europe, then I absolutely recommend putting both Amsterdam and Budapest on your bucket list.