I want to know how such sentences are translated into latin when there is no subject.
Oportet capitula perlegere si examen transibis.
(Literally: It is proper/necessary to read the chapters thoroughly if you will pass the exam.)
Another way is to use tu as the subject, as we often say "you" in English to denote anyone, not necessarily the person spoken to; e.g. "You have to study the chapters well to pass the test." The above Latin sentence also uses this trick, in the clause si examen transibis, where the second-person verb implicitly has tu as its subject.
There is no general rule for how to map English sentences with subjectless verbs (e.g. "to pass the test") to Latin. To translate, you re-express the whole thought in Latin, drawing freely upon customary Latin forms of expression.
So, it's perfectly fine to add a subject. Here is another common Latin form of expression for this kind of thought:
Ei qui examen transire vult, oportet capitula perlegere.
(Literally: To him who wishes to pass the exam, it is proper/necessary to read the chapters thoroughly.)
You don't even need to translate "must" with any Latin word at all. Another common way to put this kind of thought in Latin is to express it negatively:
Qui capitula non perlegit, examen non transibit.
(Literally: Who does not read the chapters throughly, will not pass the exam.)
I would say:
"Bene capita inspectanda (sunt) ut succedere possit."
Word-by-word this is:
"[Well] [the chapters] [must be studied + (be.PRESENT)] [so that] [to succeed] [one is able]."
When a word lacks a subject, it becomes passive. The form the passive takes depends on the tense and mood of the verb. Since you expressed a phrase concerning the future in the passive voice, the future passive (also known as gerundive) is used.
In the present, one would simply inflect the verb with a passive marker to show that the subject is receiving the verb, rather than doing the verb. For example "neco" means "I kill" whereas "necor means "I am killed."
Feel free to look up the conjugation tables for words if you want to see how they conjugated into active versus passive. Here's an example of what you could look for: https://www.verbix.com/webverbix/go.php?D1=9&H1=109&T1=neco