Step 1: Write the general equation of a straight line.
Let the equation of a straight line be
\[
y=mx+c
\]
where \(m\) is the slope and \(c\) is the intercept.
The distance of this line from the origin is
\[
\frac{|c|}{\sqrt{1+m^2}}
\]
According to the question, this distance is \(P\). Hence,
\[
\frac{|c|}{\sqrt{1+m^2}}=P
\]
Squaring both sides,
\[
c^2=P^2(1+m^2)
\]
Step 2: Convert into differential equation form.
From
\[
y=mx+c,
\]
we have
\[
m=\frac{dy}{dx}
\]
and
\[
c=y-mx
\]
Therefore,
\[
c=y-x\frac{dy}{dx}
\]
Substituting these values in
\[
c^2=P^2(1+m^2),
\]
we get
\[
\left(y-x\frac{dy}{dx}\right)^2
=
P^2\left(1+\left(\frac{dy}{dx}\right)^2\right)
\]
Step 3: Identify order and degree.
The highest order derivative present is
\[
\frac{dy}{dx}
\]
So, the order is
\[
l=1
\]
The differential equation is polynomial in \(\frac{dy}{dx}\), and the highest power of \(\frac{dy}{dx}\) is \(2\).
So, the degree is
\[
m=2
\]
Step 4: Calculate \(lm^2+l^2m\).
\[
lm^2+l^2m
=
1(2)^2+(1)^2(2)
\]
\[
=4+2
\]
\[
=6
\]
Step 5: Final conclusion.
Hence,
\[
\boxed{6}
\]