I am a M.Sc. graduated in Computer Science and I am going to continue my graduate studies abroad. There is one professor who I am in contact for a few months and now he states that he is willing to hire me as PhD student if he receives good news of the grant proposals that he submitted to funding organizations. However, there is another professor in that department that I think we have a considerable overlap in our interests and backgrounds too. I mentioned the name of those professors in my Application Form in order. So now, how can I let the second professor knows (e.g. by email) that I am serious about joining her lab if the first professor could not provide funding for me. I should mention that In this department, there is just a formality admission committee and professors (independently) hire students if they can support their students through sources of funds.
The simplest solution seems to be the best - just be honest with both. Everybody knows that funding can be very difficult, and no one would blame you for having more than one horse in the race. It is, in fact, expected of a good student to seek out options. But we can consider some options.
Logically there are four options. You discuss with both, you discuss with neither, you discuss only with your first priority (called A) or you discuss only with your second priority (called B).
Discuss with neither: Nothing good will come out of this - they cannot read minds, and don't know your intentions if you don't speak up.
Discuss only with A: If A's funding falls through, this risks becoming awkward with B. You don't, in fact, know if B for example has other plans if you don't discuss it.
Discuss only with B: If A's funding falls through and you get a place at B's team, this may be awkward as you still have to be in the same department as A.
Now ask yourself - are there any downsides from discussing with both? I cannot think of any.
If it is already open knowledge that the first professor (prof A) is your preference / the better fit, then I do not believe there is any harm in being open with both. I would recommend saying to B "I really like the work you do, and I know I would be an excellent fit for your lab. I had a difficult time choosing whether to work for you or prof A. Due to [my prior experience working with prof A]/[the fact that prof A and I already had an understanding], I am hoping to pursue working with him/her. However, it is not clear at this time if the funding will not be available. [If it doesn't work out], I would be honored to work in your lab.
Preferably, I might try to avoid "Prof A's research is closer to my interests".
If, however, it's plausible that either could be your first choice, then the choice is a little more difficult. Here, letting B know that he/she is not your first choice does come at some cost, but may still be the right move.