You don't say what client driver you are using, but any modern CQL driver should support Bound Statements, which is how you would paramaterize your queries.
You can't do a dependent query like that on two tables in a single round trip. The second one will have to be executed by your client code after you get the result from the first.