Need to create function to add 5 to randomly generated numbers

Could you show us the code of what you've done so far? A good way to do that is via a REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

Base R and packages offer a number of ways to generate random numbers. An introduction here

A good tidyverse way to update a vector of numbers in a table is with dplyr's mutate.

For example,

library(dplyr)

tibble(
  col1 = 1:5
) %>%
  mutate(
    col1 = col1 + 5
  )
#> # A tibble: 5 x 1
#>    col1
#>   <dbl>
#> 1     6
#> 2     7
#> 3     8
#> 4     9
#> 5    10

Created on 2021-02-12 by the reprex package (v0.3.0)