Nucleon and Pion Form Factors in Different Forms of Relativistic Quantum Mechanics