Applications of fixed point technique in solving certain dynamic programming and variational inequalities