Is there any relationship of hardness between the two problems?
No, you cannot infer hardness of P1. (And your question looks suspiciously close to homework.) Consider the special case where


$D$ is an undirected graph $G=(V,E)$ 
$x$ is a subset $E_x\subseteq E$
$y$ is a non-negative integer


The function value $F(x,y,D)$ 


takes the value $2$, whenever $y\ge1$;
takes the value $1$, if $y=0$ and if $E_x$ induces a Hamiltonian cycle in $G$;
takes the value $0$, if $y=0$ and if $E_x$ does not induce a Hamiltonian cycle in $G$.



  Fact. The problem P1 of maximizing $F$ for a given graph $G$ is polynomially solvable.


(Just pick $E_x=\emptyset$ and $y=1$ to reach an objective value of $2$.)


  Fact. The problem P2 of maximizing $F$ for a given graph $G$ and a given number $y$ is NP-hard.


(By fixing $y=0$, the problem becomes the NP-hard Hamilton cycle problem.)