There are a few problems with your code.
Here is the revised code I've provided for you:
import math
def project_to_distance(point_x, point_y, distance):
dist_to_origin = math.sqrt(point_x ** 2 + point_y ** 2)
scale = distance / dist_to_origin
return point_x * scale, point_y * scale
print project_to_distance(2, 7, 4)
Why is "import math" included? On the off-chance you don't know about importing, you need to include the math module in order to use advanced functions.
Where is my square_root? math.square_root() does not exist- the function you mean to call is math.sqrt().
Why did I get SyntaxError: bad input (' ')? Because in Python, whitespace (indents) are considered part of the syntax, so that programs in Python are always easier to read. You have the line scale = distance / dist_to_origin indented too far, and it confuses the Python compiler.
Why did you change print to return at the end of project_to_distance()? This is a higher programming concept -- early excercises teach you to print so that you can see your results, but unfortunately it confuses the subject of returning a value. Normally, you would put return at the end of a function because you don't always want to print. For example, math.sqrt() is a function just like project_to_distance(). Only, it does not print, it calculates and returns the value. Relate project_to_distance() to sqrt() and you will understand why return is more valuable.
Why did you add print to the end of the code? Because now that your function returns, assuming you want it to print, you have to tell it to. But now, when you run a program, you can run project_to_distance and use it as a tool in later work, rather than an always-printing function.
Happy coding.
Bonus: Here is an amazing Python tutorial
scale = distance / dist_to_originindented more than the lines before and after?