Splitting a Twig Variable into 2 Variables
If I'm following you, arrays are 0-indexed, so this would work (with a bit of cleanup).

{% set names = 'first-last'|split('-') %}
{% set firstNameSlug = names[0] %}
{% set lastNameSlug = names[1] %}

{{ firstNameSlug }}
{{ lastNameSlug }}