A usual way that we show this is by writing the random walk as
$$y_t = \sum_{i=1}^tu_t$$ and so
$$\operatorname{Var}(y_t) = \operatorname{Var}\left(\sum_{i=1}^tu_i\right) = t\sigma^2$$
and
$$\operatorname{Cov}(y_t, y_{t+k})= E\left(\sum_{i=1}^tu_i\right)\left(\sum_{i=1}^{t+k}u_i\right)-E\left(\sum_{i=1}^tu_i\right)E\left(\sum_{i=1}^{t+k}u_i\right)$$
$$=E\left(\sum_{i=1}^tu_i\right)\left(\sum_{i=1}^{t}u_i+ \sum_{i=t+1}^{t+k}u_i\right) -E\left(\sum_{i=1}^tu_i\right)E\left(\sum_{i=1}^{t}u_i+ \sum_{i=t+1}^{t+k}u_i\right)$$
$$=E\left(\sum_{i=1}^tu_i\right)^2 - \left[E\left(\sum_{i=1}^tu_i\right) \right]^2 +E\left(\sum_{i=1}^tu_i\right)\left(\sum_{i=t+1}^{t+k}u_i\right) -E\left(\sum_{i=1}^tu_i\right)E\left(\sum_{i=t+1}^{t+k}u_i\right)$$
$$=\operatorname{Var}\left(\sum_{i=1}^tu_i\right) + \operatorname{Cov}\left(\sum_{i=1}^tu_i, \sum_{i=1}^{t+k}u_i\right)$$$$=\operatorname{Var}\left(\sum_{i=1}^tu_i\right) + \operatorname{Cov}\left(\sum_{i=1}^tu_i, \sum_{i=t+1}^{t+k}u_i\right)$$
The two sums in the covariance term are independent since the white noises in the first do not appear in the second (different time-indices), so this covariance is zero, and we are left with
$$\operatorname{Cov}(y_t, y_{t+k}) = \operatorname{Var}\left(\sum_{i=1}^tu_i\right)=t\sigma^2$$