Not able to understand the problem

How are we getting the output. Like there must be some formula or some relation between the two arrays and the resultant array.