Adding and subtract inbetween row inputs and value equal to the first column next row using pandas
So are you evaluating the equality of a+b-c and d for each sample? Meaning, you aim to save the boolean value? If so:

import pandas as pd
#a sample dictionary
data = {'x1':[1,0,4,5,8,1], 
     'x2':[3,4,5,6,8,9],
     'x3':[4,5,1,-2,4,5]}
df = pd.DataFrame(data) #converting the dictionary to dataframe
df['y'] = 0 #initializing the y column with 0, also you can initialize with FALSE boolean value
for i in range(len(df)-1): #iterating between all the rows of dataframe
    df['y'].iloc[i] = df['x1'].iloc[i] + df['x2'].iloc[i] - df['x3'].iloc[i] == df['x1'].iloc[i+1] 


Note: for the last row, since the content of column y should be calculated based on the next row, the value cannot be calculated, that is why we have set (len(df)-1). 

Result:

   x1  x2  x3      y
0   1   3   4   True
1   0   4   5  False
2   4   5   1  False
3   5   6  -2  False
4   8   8   4  False
5   1   9   5      0




The problem with your code:
First, you are not considering that subsequent row to calculate the accuracy of the expression $a+b-c ==d$
Second, if that print(j) is outside the loop, is it? then you are looping in the rows of data frame while j is less than data frame's length, So when the flow is out of this while, a single value j would be returned.