Complex sentence: Both must be taken and passed in the same session in order to obtain a theory test certificate, which can then be used to book the practical driving test within two years of the theory pass.
Split into simpler sentences: Both must be taken and passed in the same session in order to obtain a theory test pass certificate, which is used at the time of booking the practical driving test. You have to give practical test within two years of the theory pass.