Because there’s no such thing as “ReycastHit2D”.
Did you look at the API docs at all? That should be the first thing you do rather than post on the forums. There’s also no such thing as “Boxcast”. There is however a “BoxCast”. C# is case sensitive and you also need to spell things exactly.
Also, please use code-tags when posting code and not plain text.