Hello veronikaluv and welcome to the forum,
Code the FD as though it had only one record type. This would be the FD, a level-01 for the first recored type, and the elementary items.
Then, add a seond level-01 for the second record type and add those elementary items.
If the procedure division, read the file and if the record is an 01 process the 01 fields and if the record is an 02, process those fields.
When you have questions or something does not compile or does not work, post your question and/or any diagnostic info from the compiler or some run-time error.
Hope this helps,