I am still not sure I understand your goal. In the code below, I invented a little data frame with two columns named D7A and D7B and then I made a new column that is a list column. Each row in that column contains a vector of length two the contains the two values from D7A and D7B. Is that what you want?
library(tidyverse)
#> Warning: package 'tibble' was built under R version 4.1.2
HW3data <- data.frame(D7A=sample(1:5,6,replace = TRUE),
D7B=sample(1:5,6,replace = TRUE))
HW3data
#> D7A D7B
#> 1 4 1
#> 2 3 2
#> 3 2 5
#> 4 2 5
#> 5 3 5
#> 6 1 3
HW3data <- HW3data |> mutate(partyid=map2(D7A,D7B,c))
HW3data
#> D7A D7B partyid
#> 1 4 1 4, 1
#> 2 3 2 3, 2
#> 3 2 5 2, 5
#> 4 2 5 2, 5
#> 5 3 5 3, 5
#> 6 1 3 1, 3
HW3data$partyid
#> [[1]]
#> [1] 4 1
#>
#> [[2]]
#> [1] 3 2
#>
#> [[3]]
#> [1] 2 5
#>
#> [[4]]
#> [1] 2 5
#>
#> [[5]]
#> [1] 3 5
#>
#> [[6]]
#> [1] 1 3
Created on 2022-04-05 by the reprex package (v2.0.1)