A physical system is described by a law of the form $f(E,P,A)=0$ where $E,P,A$ represent, respectively, enery, pressure and area of surface. Find an equivalent law that relates suitable dimensionless quantities.
I have tried the following:
The fundamental units are:
Mass: $M$, Length: $L$, Time: $T$.
Thus: $$[E]=ML^{2}T^{-2} \\ [P]=ML^{-1}T^{-2} \\ [A]=L^2$$
In this case, the number of fundamental units is equal to the number of the quantities with dimensions, so we cannot apply Buckingham $\pi$ theorem , right?
But how else can we find an equivalent law that relates suitable dimensionless quantities? Or have I done something wrong at the choice of the fundamental units?
I guess you're referring to the Buckingham $\Pi$ Theorem statement from "Applied Mathematics", by J. David Logan:
The part you're struggling with is the $n < m$ bit, right? I think that Logan states that condition in the theorem just as a reassurance that $\text{rk}(D) < m$, which is what you really need in order to be able to apply the theorem. (It probably makes his life easier when he is proving the theorem)
Now, if we assemble the dimensionality matrix of your specific problem, we get
$$D = \begin{array}{c c} & \begin{array}{c c c} E & P & A \\ \end{array} \\ \begin{array}{c c c} M \\ L \\ T \end{array} & \left[ \begin{array}{r r r} 1 & 1 & 0 \\ 2 & -1 & 2 \\ -2 & -2 & 0 \end{array} \right] \end{array}$$
and we can observe that the first and third rows of $D$ are linearly dependent, so $\text{rk}(D)=2$ and there is $m - \text{rk}(D) = 1$ dimensionless quantity, let's say $\Pi_1$.
Moreover,
$$ \text{Ker}(D) = \left\{ \alpha \begin{bmatrix} -1 \\ 1 \\ 3/2 \\ \end{bmatrix}, \, \alpha \in \mathbb{R} \right\},$$
so, by choosing $\alpha=1$, we get $$\Pi_1 = E^{-1} P^{1} A^{3/2}.$$
Hence, by the $\Pi$ Theorem, assuming that the physical law is unit-free, we conclude that $$f(E,P,A) = 0,$$ is equivalent to the physical law $$g(\Pi_1) = g\left(E^{-1} P^{1} A^{3/2}\right)=0,$$ and this implies that $$E^{-1} P^{1} A^{3/2} = \text{const}.$$