Hi:
I'm not 100% sure I understand what you are currently doing, but I think you need your Type option to be inside your repeating group -- it seems that each instance has a Type, and the Type needs to be selected -- is that the case?
If not, if, instead, Type applies to the form as a whole, you add rules to the repeating group itself with a condition based on Type -- so when a new row is added, if Type (at the form level) is set to Option A, ID is set to N/A.
Another option, of course, would be to use custom validation instead of "cannot be blank" validation. Then you can base the validation of your two fields on the selected Type.