Can I tie a vanity sink drain into the bathtub drain?
A couple considerations:

You cannot "double trap" any fixture. To utilize the trap in the floor for your lavatory, you need to ensure that the length of the trap arm does not exceed maximum allowable distance (42" for 1 1/2" trap arm, in CA USA, I think). It looks like you are pretty close to max distance but you did not say in your question.

Also, max trap arm change of direction is 90°, but you would have two 90° bends. You AHJ might allow though if you install an accessible clean-out.