How much should a mass air flow sensor cost me?

I don’t think you got ripped off, but I think that you used a cost ineffective strategy. If you can possibly fix a car yourself, you almost always should. Even considering the inevitable mistakes you will make that an inexperienced mechanic wouldn’t, your time and dollars will go a lot further if you do the work yourself. And parts will usually be cheaper than if you had a mechanic buy the part and resell it to you.

Consider that you got a $120 lesson in the economics of automobile repair and be thankful that it wasn’t a $1200 lesson.