A theoretical analysis of the lowest excited states in HNO/NOH and HPO/POH