This is going to be tighter than a scotchmans wallet but I think I have you a working solution.
A shower stall is required to have a 2" drain line but a tub/shower only requires an 1-1/2" line.
The estimated overall run is 24" + 42" = 66" (5.5')
1-1/2 must have a 1/4" per foot pitch so the pitch allowance from the cast to the trap is 5.5 (5 x 1/4)+1/8 = 1-3/8"
You currently have 3" vertical clearance with the 2" pipe therefore dropping the pipe to 1-1/2" will drop the top of the pipe about 1/8" leaving about 3-1/8" vertical from the top of the pipe to the underside of the subfloor.
Subtrating the pitch allowance from the vertical clearance we get 3-1/8 - 1-3/8 = 1-3/4"
You will need two 1-1/2 street 1/4 bends and a 2 x 1-1/2 bushing.
On the open end of the PVC from the cast install the 2 x 1-1/2 reducer bushing then install an 1-1/2" street 1/4 bend turning vertical. You can then install the second 1-1/2 street 1/4 bend at any infinite angle to return your run to the desired angle.
