The second example, al-salah li-l-arkan al-makhsusah, refers to the ritual prayer consisting of prescribed components, such as standing, bowing, and prostration. It is a literal use within established legal-religious terminology.
Salah is also associated with supplication in its linguistic history. That fact alone does not make every use for ritual prayer figurative: literalness must be assessed relative to the relevant convention of assignment.