Both equations are correct, they are just writing the incoming radiance at point $x$ as an integral over two different domains. The first line is the solid angle formulation (integrating over all $\omega \in \Omega$), while the second one is the surface area formulation (integrating over all differential area point $A_y \in S_l$). The additional cosine term divided by the square distance is simply the Jacobian of this change of variable.
The surface area formulation of the rendering equation is quite useful as it allows to integrate over all area light sources in a scene. Sometimes, it can be better to use the solid angle form for certain types of emitters (e.g. when your emitter is a perfect sphere, in which case you can sample its spherical cap more efficiently). In most cases, however, the surface area is preferred as it allows for more general emissive profiles.
As an example, suppose your light is an emissive bunny. How would you sample the subtended solid angle? It can be quite tricky without determining the silhouette edges! But in the surface area form, all you have to do is sample a triangle proportional to its area, sample a point on that triangle using barycentric coordinates, and you're done.
Both formulations have their pros and cons and a renderer will allow you to switch between one and the other (only when possible), with the default being surface area as most emitters are usually attached to an arbitrary mesh.