Here is the example of how to make this with Epilog:
(* These are the list and a function to fit it that will be plotted *)
lst = Transpose[{RandomReal[{0, 3}, 30],
RandomReal[{-0.03, 0.03}, 30]}] /. {x_, y_} -> {x, x*Exp[-x] + y};
ft = FindFit[lst, a + b*x*Exp[-c*x], {a, b, c}, x];
(* End ofg the list and fitting function *)
(* The show statements begins *)
Show[{
ListPlot[lst, PlotRange -> {{0, 3.5}, Automatic}
],
Plot[a + b*x*Exp[-c*x] /. ft, {x, 0, 3},
PlotRange -> {{0, 3.5}, Automatic}, PlotStyle -> Red]
},
(* The legends in the Epilog are starting here *)
Epilog -> Inset[Framed[Column[{
PointLegend[{Blue}, {" Data"}],
LineLegend[{Red}, \
{"f(x)=\!\(\*SuperscriptBox[\(x\[ExponentialE]\), \(-x\)]\)"}]
}], RoundingRadius -> 5], Scaled[{0.8, 0.85}]]
(* End of the Legends *)
]
It should look like this:

The same might be done using the Prolog. The difference is only visible, if the legends overlaps with the plots.
Another way is to place Legends into each Plot or ListPlot statement. The example using the same list and fitting function is given below. Then it lacks the common frame.
Show[{
ListPlot[lst, PlotRange -> {{0, 3.5}, Automatic},
(* The PointLegend starts *)
PlotLegends ->
Placed[PointLegend[{" data"}, LabelStyle -> {Blue, 10}],
Scaled[{0.69, 0.9}]]
(* The PointLegend ends *)
],
Plot[a + b*x*Exp[-c*x] /. ft, {x, 0, 3},
PlotRange -> {{0, 3.5}, Automatic}, PlotStyle -> Red,
(* The LineLegend starts *)
PlotLegends ->
Placed[LineLegend[{Row[{Style["f(x)=", Italic],
Style[NumberForm[a + b*x*Exp[-c*x] /. ft, {2, 1}],
Italic]}]}, LabelStyle -> {Red, 10}], Scaled[{0.8, 0.8}]]]
(* The LineLegend ends *)
}]
It should look like the following:

Edit: To address the question about the spacing between the legends. It is easy to do in the case of the second method, since in this case there are two different legends, each having been created within its own Plot statement. Thea are then placed one under the other, and the point in which the second one is placed was chosen by me. Like this I can easily choose another point instead. Please see the example below. There the parameter z defines the displacement of the second legend from its initial position. Play with the slider to see its effect:
lst = Transpose[{RandomReal[{0, 3}, 30],
RandomReal[{-0.03, 0.03}, 30]}] /. {x_, y_} -> {x, x*Exp[-x] + y};
ft = FindFit[lst, a + b*x*Exp[-c*x], {a, b, c}, x];
Manipulate[
Show[{ListPlot[lst,
PlotRange -> {{0, 3.5}, Automatic},(*The PointLegend starts*)
PlotLegends ->
Placed[PointLegend[{" data"}, LabelStyle -> {Blue, 10}],
Scaled[{0.69, 0.9}]]
(*The PointLegend ends*)],
Plot[a + b*x*Exp[-c*x] /. ft, {x, 0, 3},
PlotRange -> {{0, 3.5}, Automatic},
PlotStyle -> Red,(*The LineLegend starts*)
PlotLegends ->
Placed[LineLegend[{Row[{Style["f(x)=", Italic],
Style[NumberForm[a + b*x*Exp[-c*x] /. ft, {2, 1}],
Italic]}]}, LabelStyle -> {Red, 10}],
Scaled[{0.8, 0.8 - z}]]]
(*The LineLegend ends*)}], {z, 0, 0.5}]
You should see the following:

In principle one can change the spacing also within the first approach. Under the Epilog-Inset... You find the statement Column there. In principle, one should be able to insert the statement Spacer between the first and the second argument of the Column as follows: Column[{statement1, Spacer[z],statement2}]
and play with the numeric value of z. However, this did not work for me. Looks as a bug, though I am not sure. If you only need to increase the distance between the lines in the legend you might choose to enter something invisible between the first and the second argument of the Column. For example, you can do it as follows:
Manipulate[
Show[{ListPlot[lst, PlotRange -> {{0, 3.5}, Automatic}],
Plot[a + b*x*Exp[-c*x] /. ft, {x, 0, 3},
PlotRange -> {{0, 3.5}, Automatic},
PlotStyle -> Red]},(*The legends in the Epilog are starting here*)
Epilog ->
Inset[Column[{PointLegend[{Blue}, {" Data"}], Style["", z],
LineLegend[{Red}, \
{"f(x)=\!\(\*SuperscriptBox[\(x\[ExponentialE]\), \(-x\)]\)"}]}],
Scaled[{0.8, 0.85}]]
(*End of the Legends*)], {z, 10, 50}]
Here I added an empty string, but the distance varies due to the variation of the size of the absent text. Play with the slider to see the effect.
Have fun!