First, you're making PHP do a bit more work then it needs to by doing this:
$Scale_Height="$x";
When really you should just do:
$Scale_Height=$x;
(Minus the quotes around $x) Both lines of code do the same thing, but the 2nd version prevents PHP from trying to parse a string and then insert $x into the string and then return it to $Scale_Height (think of the quotes as a middle man in a transaction and in this case, you don't need a middleman).
Also, the reason why $Scale_Width does not work outside of your function is because of $Scale_Width has what's called "function scope".
When you define a variable, that variable typically lives within the scope of the definition. Since you defined it in the function, it will only live within that function. Oddly enough, this is a good thing.
I think what you'll want to do is have the function return the width. Its pretty simple: at the end of the function, just put in "return $width;" (minus the quotes of course). Then when you call the function, you have something like: $width = Image_Tool(...); And $width will get the returned value.
For a function like this though, you may want to return both values. In doing so, you will need to figure out how you want to return that data back (easiest is probably put the data in an array and return the array - fancy would be to use a class instead).
If you're not sure what's up on how the "return" works, check out php.net and check out the documentation. It will have more examples then what I can put here on what you can do with return.