You have a three possible solutions, the third of which will work but will get some pro plumber blasting me here (but I don't mind). You probably didn't get a permit to install the vanity and won't need an inspection.
1. Get the plumber to fix the piping for free, or pay him to do it right the second time.
2. Tear it out and do it yourself.
3. Construct a special P-trap as follows (check fit and dimensions before gluing):
From the sink, using the tailpiece and pipe, drop down 4 to 6" below the outlet in the wall, and turn toward the wall with a 90.
At the wall, use a 90 to point diagonally up toward the outlet in the wall.
At the outlet point, use another 90 to connect the sloping pipe to the wall pipe.
At some convenient place, reduce the 2" to the size you need for the vanity (1 1/4 or 1 1/2). I would probably do it at the elbow connecting at the wall. Use compression joints at the ends of the trap so you can clean the trap and the downstream pipe.
Now what you have is a P-trap that consists of the following:
The tailpiece and extension is the downleg of the trap.
The first El and the up-angled El at the wall finish the U of the trap.
The elbow at the wall connection corresponds to the transition from the "vertical" of the trap to the horizontal outlet.
The total angle change of 270 degrees is exactly the same as a usual P-trap. The only difference is that the leg lengths are a little longer and the "vertical", while providing the necessary vertical distance, is not truly vertical but works perfectly well. The trap will seal and will not siphon because the vent that is in the wall will prevent the pressure from falling below the house pressure, which would be a necessary condition for pulling the water out of the diagonal up leg.