The given compound statement is "Two lines are perpendicular if and only if they form right angles".
The two statements are:
p: Two lines are perpendicular
q: Two lines form right angles.
The statements can be written in conjunction as:

The above symbolic representation in statement form is:
If two lines are perpendicular, they form right angles, if they form right angles then two lines are perpendicular.
Hence option B is correct.