if $A$ is free for a class $\mathcal{K}$ over $X$ then $A$ is free over $HSP(\mathcal{K})$ over $X$
So letting $\mathcal{K}$ be a class of algebras and $X$ be a set of generators such that $A \in \mathcal{K}$ is free over $X$.
Then we know for any other algebra $B$ of class $\mathcal{K}$
and for $\alpha : X \to B$ there exists a unique homomorphism $\beta : A \to B$
Also know that $HSP(\mathcal{K}) = V(\mathcal{K})$ i.e. the variety generated by $\mathcal{K}$.
consider a family of algebras $(B_i)_{i\in I}$ from the class
Seems that for any $\alpha_i : X \to \prod_{i \in I} B_{i}$ there will be a unique homorphism $\beta_i : \prod_{i \in I}A_i \to \prod_{i \in I}B_i$ where $A_i = A, \forall i \in I$
Then $A$ is free in $P(\mathcal{K})$ over $X$
Is this the correct intuition? If so it seems that a similar occurence will happen for $SP(\mathcal{K})$ and then again for $HSP(\mathcal{K})$
let $A$ be free over $\mathcal{K}$ over $X$.
Let $B \in P(\mathcal{K})$
then $B = \prod_{i\in I} B_i$ where each $B_i \in \mathcal{K}.$
now if $\alpha : X \to B$ then using the canonical projection map $\pi$ we get that $\pi_i \circ \alpha : X \to B_i$ for all $i \in I$ and by $A$ being free we get $\beta_i : A \to B_i$ thus
$\prod_{i \in I}\beta_i : A \to \prod_{i\in I} B_i = B$ is the unique homomorphism required.
Now let $B \in H(\mathcal{K})$, then there exists onto homomorphism
$\gamma : C \to B$ where $C \in \mathcal{K}$. and let $\alpha : X \to B$ then by free-ness of $A$ in $\mathcal{K}$ over $X$. We know that for $\alpha':X \to C$ there is $\beta' : A \to C$ define $\beta : A \to B$ as $\beta(x) = \gamma \circ \beta'(x) $ for all $x \in X$ thus the desired unique homomorphism.
Lastly, Let $B \in S(\mathcal{K})$ then $B \le C \in \mathcal{K}$,
now $\alpha : X \to B$ is also a map from $X$ to $C$ thus we have $\alpha : X \to C$ and by the free-ness of $A$ we get that
there exists unique homomorphism $\beta' : A \to C$ then define $\beta = \beta '$. (this part might be missing something)