Text this: Optimal Deployment Strategy for Reconfigurable Intelligent Surface under LoSD via Joint Active and Passive Beamforming