In man jamaʿa nasiyan, man introduces a general conditional construction, jamaʿa is a past-tense verb, and nasiyan is an accusative circumstantial qualifier (hal).
In ka-man jamaʿa ʿamidan, the prefix ka- expresses comparison, and ʿamidan is another hal. The parallel phrasing contrasts the states of forgetfulness and deliberate action.