A second man has been arrested for allegedly trying to set a synagogue alight in Sydney's Inner West.