Take it back and have them look at the transmission problems they stuck you with. From the sound of your problem, the transmission is not only slipping, but it is also shifting improperly. There are several areas that may be causing the problem. It is possible that the torque converter is on its way out. Or, it may be that the next device downstream, the impeller, is working improperly because it is broken.
Further, it is possible that the clutches/bands are slipping which means that it won’t shift properly and it also means that the gears may not be changing and seating correctly. Again, this can cause slipping.
I would have them look closely at the clutches/bands as they may not be working properly.
Interestingly, it is possible that this is being caused electronically. In other words, there could be an electronic problem which also makes lots of sense because a transmission today is about electronics as much as it is mechanics.
For example, it is possible that the MAP (Mass Air Pressure) sensor is operating improperly. Or, the MAF (Mass Airflow Sensor) could be intermittent and working improperly, as well. Further, it might be that a solenoid is firing incorrectly or the TPS (Throttle Positioning Sensor) is sending improper information to the TCU (Transmission Control Unit).
As you can see, then, there are many possibilities. I would suggest next and OBD-II diagnostic to narrow the problem and looking at the readout from the ECU (Engine Control Unit) to see what error codes are being generated. Today’s software does an amazing job of pinpointing where a problem may be.
Next, discuss the findings with your service advisor and have the issue repaired. In general, if it is a sensor problem, it will cost, depending on the sensor between $400 and $1,000 (there may be more than one involved or it could be wiring or a combination). It might also be a combination of transmission mechanicals and electronics.
I would then suggest talking with the service manager to see if they are willing to do something about helping you out with a discount because you are experiencing something that could have been detected by diagnostic reading before the vehicle was sold. You may not hear the answer you want, but it never hurts to ask. I personally think that if your repair site — dealership in this example — being reputable should help you out, but, as I say, it is just my opinion.