When you install Ubuntu alongside Windows it will create new partitions
Based on the pictures and your comments you want to put Ubuntu and Windows in the same partition called
1/dev/sda2 in Ubuntu and
C:\ in Windows. This is not possible. Ubuntu will always be in a separate partition. It may also create a small partition called
swap for its own purposes.
When you choose Install Ubuntu alongside Windows Ubuntu installation will automatically find the partition with most space and propose to shrink it to make space for the new partitions needed for Ubuntu. This is what your first picture is showing. You can move the divider left or right to allocate more or less space to Ubuntu.
Since you are new to Ubuntu, I suggest you use this option.
I am not sure why the Ubuntu installation does not give you the option to resize the Windows partition. It is possible that the Windows partition (
C:\ drive) is fragmented and the Ubuntu installation program cannot shrink it without destroying the Windows files and programs.
If you really want to split the
C:\ drive into Windows and Ubuntu partitions, then you will need to boot Windows and use Windows partition management tools to shrink the
C:\ drive. Keep the freed up space unallocated/free after you shrink the
C:\ drive. Do not create a new partition while in Windows. Ubuntu uses a different type of partition called
ext4, and won't use the partition you create in Windows.
When you try installing Ubuntu again alongside Windows, the installation program will find the free space you had created and use that space to create the partitions it needs to install Ubuntu.
Hope this helps