Since Main is static, you cannot use the rest of the Program Class inside your static method.
Therefore you need an instance of the Program Class.
Change
int j;
j = pt(3, 4);
Into
int j;
Program P = new Program();
j = P.pt(3, 4);
I would recommend writing the pt(int,int) method in another class though, but maybe thats just me.