The experience of working under a well-known professor will impact positively on your profile, and is generally quite valuable for graduate applications. However, you need to take a call on whether the effort you put in is worth the result, and whether this is the only avenue for you to improve your profile.
You say that you're not a US citizen and this is a summer research project in the US, under a famous professor. You also mention that it's going to be very expensive for you. From this, and the general tone of your post, I assume that you're not in the US currently and that you're looking to travel there if possible. You have to settle in, find a place to live, find a sustainable plan for yourself in terms of finances and amenities, and also conduct publishable research, all in one summer. You need to decide whether all of this is possible.
This is quite a lot of work for one summer. There are going to be easier avenues for you to publish papers, avenues that are worth considering over this.