Existence of solutions for fractional differential equation with p-Laplacian through variational method