Teorema lui Thales, asemănarea triunghiurilor