We can define the number of units as x
With the info given we can calculate the price for the first 50 units like this:
Now for the next 50 units we have this:
And finally for the price units over 100 we have:
And then the total price would be:
And replacing we got:
And we can simplify and we got: