The first "свой" acts like a noun.
Кто свояка видит издалека? Свой. (Who sees (кого? - accusative) свояка from afar?)

The second "свой" acts like an adjective.
Какой дурак дороже чужого умника? Свой. (What/which (кто? - nominative) fool is more valuable than... ?)

Or, perhaps, you will figure it out for yourself if I just rewrite the first sentence with more "grammatically orthodox" word order:
1. Свой видит свояка издалека. (this is not idiomatical, mind you)

By the way, the more common saying is
Рыбак рыбака видит издалека.