Arduino UNO R3 using two outputs dependent to different inputs

Thanks a lot, Alto777, now logic is working as expected.